Created attachment 295745 [details, diff] patch to #include <limits.h> # USE="-network-cron -python -zlib" emerge usbutils [...] make[4]: Entering directory `/var/tmp/portage/sys-apps/usbutils-005/work/usbutils-005/usbhid-dump/src' x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I/var/tmp/portage/sys-apps/usbutils-005/work/usbutils-005/usbhid-dump -I/var/tmp/portage/sys-apps/usbutils-005/work/usbutils-005/usbhid-dump/include -D_GNU_SOURCE -DNDEBUG -Os -Wall -march=native -O2 -pipe -c usbhid-dump.c usbhid-dump.c: In function ‘parse_timeout’: usbhid-dump.c:764:60: error: ‘UINT_MAX’ undeclared (first use in this function) usbhid-dump.c:764:60: note: each undeclared identifier is reported only once for each function it appears in usbhid-dump.c: In function ‘dump’: usbhid-dump.c:156:15: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result [-Wunused-result] make[4]: *** [usbhid-dump.o] Error 1 The build failure occurs both with USE="zlib -network-cron -python" and USE="-network-cron -python -zlib". The obvious solution is to #include <limits.h> in usbhid-dump.c; the patch is attached, and it allows me to build usbutils-005. I have submitted the patch upstream to https://sourceforge.net/tracker/?func=detail&aid=3459209&group_id=233297&atid=1089171 (note that usbhid-dump has a separate upstream from usbutils, and is included in usbutils as a git submodule).
Created attachment 295747 [details] emerge --info
looks like Debian had same patch, but also stddef.h was missing in another file, so: + 14 Dec 2011; Samuli Suominen <ssuominen@gentoo.org> usbutils-005.ebuild, + +files/usbutils-005-missing-includes.patch: + Fix missing limits.h and stddef.h wrt #394633 by Alexandre Rostovtsev. This + is Debian patch 04-missing-includes.diff. thanks again