Most recent kernel where this bug did not occur: 2.4.31 (I only tried 2.6.16.11, 2.6.16.14 and 2.4.31) Distribution: Slackware 10.2 (with 2.4.31), but the 2.6.16.x are mainline kernels from kernel.org Hardware Environment: Software Environment: Problem Description: Compilation of programs #including linux/input.h fails (gcc version 3.3.6): In file included from test.c:2: /usr/include/linux/input.h:801: error: syntax error before "kernel_ulong_t" /usr/include/linux/input.h:805: error: syntax error before "evbit" /usr/include/linux/input.h:805: error: `BITS_PER_LONG' undeclared here (not in a function) /usr/include/linux/input.h:806: error: syntax error before "keybit" /usr/include/linux/input.h:806: error: `BITS_PER_LONG' undeclared here (not in a function) (...) /usr/include/linux/input.h:815: error: syntax error before "driver_info" /usr/include/linux/input.h:805: error: storage size of `evbit' isn't known /usr/include/linux/input.h:806: error: storage size of `keybit' isn't known /usr/include/linux/input.h:807: error: storage size of `relbit' isn't known (...) Steps to reproduce: Just try to compile this: ------------------------- #include <stdio.h> #include <linux/input.h> int main(int argc, char **argv) { printf("OK\n"); return 0; } ------------------------- http://lists.altlinux.org/pipermail/sisyphus/2006-April/080482.html suggests that this is because of using BITS_PER_LONG outside kernel space. Their patch to linux/input.h solved the problem for me. I ran into this when some packages of X.Org 7.0 failed to build (xorg-server, among others). Alex
Don't include kernel headers in userspace. Bug rejected. Thanks, Nish