Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 52141

Summary: apcupsd fails to build binary if linux-headers 2.6.5 (or others) installed
Product: Gentoo Linux Reporter: Derk W te Bokkel <derk.tebokkel>
Component: New packagesAssignee: Michael Imhof (RETIRED) <tantive>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Derk W te Bokkel 2004-05-26 15:12:55 UTC
binary fails to build since /usr/include/linux/hiddev.h does not have a definition for  HID_MAX_USAGES thus build of the libusb dependent portion fails and all binary builds fail although ebuild will run to completion ..

adding the lines to /usr/include/linux/hiddev.h just before HID_MAX_USAGES is used:

#ifndef HID_MAX_USAGES
#define HID_MAX_USAGES	1024
#endif

fixes the problem .. for people using just kernel sources  (hid.h defines HID_MAX_USAGES 1024)
Comment 1 Michael Imhof (RETIRED) gentoo-dev 2004-05-27 02:26:45 UTC
I'll look into that in the next days.
There is a similar bug that is hiddev related, maybe it's the same issue.
Comment 2 Michael Imhof (RETIRED) gentoo-dev 2004-08-30 17:14:00 UTC
newer linux-headers have the definition...

mobile root # emerge -s linux-headers
Searching...
[ Results for search key : linux-headers ]
[ Applications found : 1 ]

*  sys-kernel/linux-headers
      Latest version available: 2.4.21-r1
      Latest version installed: [ Not Installed ]
      Size of downloaded files: 27,864 kB
      Homepage:    http://www.kernel.org/ http://www.gentoo.org/
      Description: Linux 2.4.21 headers from kernel.org
      License:     GPL-2


mobile root # cat /usr/include/linux/hiddev.h | grep HID_MAX_USAGES
#define HID_MAX_USAGES 1024 /* From: drivers/usb/input/hid.h */
        __s32 values[HID_MAX_USAGES];
Comment 3 Michael Imhof (RETIRED) gentoo-dev 2004-08-30 17:14:48 UTC
sorry, wrong search...


mobile root # emerge -s linux26-headers
Searching...
[ Results for search key : linux26-headers ]
[ Applications found : 1 ]

*  sys-kernel/linux26-headers [ Masked ]
      Latest version available: 2.6.8.1
      Latest version installed: 2.6.8.1
      Size of downloaded files: 34,793 kB
      Homepage:    http://www.kernel.org/ http://www.gentoo.org/
      Description: Linux 2.6.8.1 headers from kernel.org
      License:     GPL-2