# \[PATCH\] remove \#ifdef \_\_KERNEL\_\_ from atomic.h

- From: Ben Stanley \<hidden\>
- Date: 2002-09-25 05:11:16 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2002/09/9384526
- Thread: https://ratatoskr.run/linuxppc-dev/2002/09/9384526/t.md

```text
Hi,

I was trying to compile sumji (formerly xtunes), which requires
libCommonC++. I found that libCommonC++ would not compile, because it
needs to use the atomic functions declared in include/asm-ppc/atomic.h .
However, this file does not declare these functions unless __KERNEL__ is
defined. I believe that this is incorrect.

I have checked the i386 and s390 versions of atomic.h and they declare
the atomic functions regardless of the status of the __KERNEL__ macro.
Therefore I propose that it should be removed from asm-ppc/atomic.h, and
have attached a patch to effect this.

With this patch applied, I am able to compile libCommonC++.

Ben Stanley.

```

## Attachments

- [atomic\_ppc.patch](https://ratatoskr.run/linuxppc-dev/2002/09/9384526/attachment/0) (text/plain, 449 bytes)
