Package: libusb-1.0-0-dev Version: 2:1.0.21-1 Severity: serious Tags: patch buster sid Control: affects -1 src:ippusbxd
https://buildd.debian.org/status/fetch.php?pkg=ippusbxd&arch=ppc64el&ver=1.30-2&stamp=1497806137&raw=0 ... [ 50%] Building C object CMakeFiles/ippusbxd.dir/usb.c.o /usr/bin/cc -I/usr/include/libusb-1.0 -g -O2 -fdebug-prefix-map=/«PKGBUILDDIR»=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -o2 -g -std=c99 -Wall -Wextra -pedantic -pedantic-errors -o CMakeFiles/ippusbxd.dir/usb.c.o -c /«PKGBUILDDIR»/src/usb.c In file included from /«PKGBUILDDIR»/src/usb.c:23:0: /usr/include/libusb-1.0/libusb.h:1815:67: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration int LIBUSB_CALL libusb_wait_for_event(libusb_context *ctx, struct timeval *tv); ^~~~~~~ /usr/include/libusb-1.0/libusb.h:1818:9: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration struct timeval *tv); ^~~~~~~ /usr/include/libusb-1.0/libusb.h:1820:9: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration struct timeval *tv, int *completed); ^~~~~~~ /usr/include/libusb-1.0/libusb.h:1824:9: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration struct timeval *tv); ^~~~~~~ /usr/include/libusb-1.0/libusb.h:1827:9: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration struct timeval *tv); ^~~~~~~ /«PKGBUILDDIR»/src/usb.c: In function 'usb_pump_events': /«PKGBUILDDIR»/src/usb.c:519:50: error: passing argument 2 of 'libusb_handle_events_timeout_completed' from incompatible pointer type [-Wincompatible-pointer-types] libusb_handle_events_timeout_completed(NULL, &tv, NULL); ^ In file included from /«PKGBUILDDIR»/src/usb.c:23:0: /usr/include/libusb-1.0/libusb.h:1819:17: note: expected 'struct timeval *' but argument is of type 'struct timeval *' int LIBUSB_CALL libusb_handle_events_timeout_completed(libusb_context *ctx, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CMakeFiles/ippusbxd.dir/build.make:134: recipe for target 'CMakeFiles/ippusbxd.dir/usb.c.o' failed make[4]: *** [CMakeFiles/ippusbxd.dir/usb.c.o] Error 1 __linux is not defined on ppc with -std=c99, the attached patch uses __linux__ instead for the required #include <sys/time.h>
Description: libusb.h: use __linux__ instead of __linux The check was added since sys/time.h is not available on windows, but breaks on ppc where __linux is not defined by gcc in strict standards modes. Author: Adrian Bunk <b...@debian.org> --- libusb-1.0-1.0.21.orig/libusb/libusb.h +++ libusb-1.0-1.0.21/libusb/libusb.h @@ -54,7 +54,7 @@ typedef unsigned __int32 uint32_t; #include <sys/types.h> #endif -#if defined(__linux) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__HAIKU__) +#if defined(__linux__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__HAIKU__) #include <sys/time.h> #endif