Re: Problem including <asm/timex.h> (linux-kernel-headers 2.6.17)
>> /usr/include/linux/seqlock.h:76: error: expected '=', ',', ';\
>> ', 'asm' or '__attribute__' before 'unsigned'
>> /usr/include/linux/seqlock.h:91: error: expected '=', ',', ';\
>> ', 'asm' or '__attribute__' before 'int'
> This comes from the __always_inline that is not defined. To define it, include
> Kernel headers tend to not include all headers for the things they use, you
> magically have to find the right combination yourself.
Thanks for your answer. This takes me one step further, which is this:
In file included from /usr/include/linux/cpumask.h:86,
/usr/include/linux/bitmap.h: In function 'bitmap_zero':
/usr/include/linux/bitmap.h:128: error: 'BITS_PER_LONG' undeclared \
(first use in this function)
/usr/include/linux/bitmap.h:128: error: (Each undeclared identifier is \
BITS_PER_LONG seems to be declared in asm/types.h (i.e.
asm-x86_64/types.h in my case) and looks like this:
* These aren't exported outside the kernel to avoid name space clashes
#define BITS_PER_LONG 64
The same is true for the macro DECLARE_BITMAP which is used in cpumask.h
and defined in linux/types.h.
So this brings me back to me original problem: are user-space
applications allowed/supposed to use these headers? And if so, how are
they to be used if the headers rely on __KERNEL__ to be defined?
Thanks once more for any help,