Skip to contentSkip to conversation

PROBLEM: compilation error when including asm/system.h in user mode code

DISCUSSION А.=?windows-1251?Q?=C8?=. Ченцов 1 participant 1 message Jun 21, 2006

lore
Share & tools
lore
#0 lore raw

Description:
Starting 2.6.15 'include/asm-i386/system.h' has lines (301-304)

extern unsigned long cmpxchg_386_u8(volatile void *, u8, u8); extern unsigned long cmpxchg_386_u16(volatile void *, u16, u16); extern unsigned long cmpxchg_386_u32(volatile void *, u32, u32);

Here u8, u16, u32 types used in nonkernel namespace producing undefined type errors.

Solution:
Rename types to __u8, __u16, __u32.

Since a few distributions derive their glibc kernel headers directly from kernel the problem is quite relevant.

Regards,
A. Chentsov.