util-linux-2.12: did you find a fix?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines
I read your email on LKML about the problem compiling util-linux-2.12
with linux-2.6.0-test5 headers (the problem with_IOC_TYPECHECK). Did you find a way to fix the problem? If you solved it, could you tell me how to fix the util-linux problem?
I solved it so:asm/ioctl.h:
...............
/* used to create numbers */
#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))
#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) #define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) #define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) #define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
.....................
I patched all files that contains next defines:_IOR, _IOW or _IOWR
with_IOR_BAD, _IOW_BAD, _IOWR_BAD
Really it is not right.
But it would be so if I complie with 2.4.x headers
sizeof(sizeof(anymore)) is sizeof(int). And threre was int. Thus it was right only there.
Sin (Sinelnikov Evgeny)