Bug 6862

Summary: included /usr/include/linux/input.h doesn't compile (since at least linux-2.6.16.11)
Product: xorg Reporter: Alexander Schmid <sahib>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED NOTOURBUG QA Contact:
Severity: normal    
Priority: high    
Version: 7.0 (2005.12)   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Alexander Schmid 2006-05-09 04:34:43 UTC
linux/input.h is included (at least) from
xorg-server-X11R7.0-1.0.1/hw/dmx/examples/ev.c, 
xorg-server-X11R7.0-1.0.1/hw/dmx/input                                         
                                                           /usb-private.h      
                                                                               
   , xf86-input-aiptek-X11R7.0-1.0.0.5/src/xf86Aiptek.h.

With linux-2.4.31, everything compiles cleanly (gcc version 3.3.6). With
linux-2.6.11-14 the following error occurs:
---------------
/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"            
          
(...)
---------------

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.

Is this a kernel bug or a changed interface problem or what?
Comment 1 Daniel Stone 2006-05-09 19:24:09 UTC
it's a kernel problem (or, more specifically, a problem with whatever provides
/usr/include/linux for you).  you probably want to report it to your
distribution.  cheers.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.