ToadKing / wii-u-gc-adapter

Tool for using the Wii U GameCube Adapter on Linux
MIT License
241 stars 44 forks source link

Failed Build, LIBUSB_HOTPLUG_NO_FLAGS #38

Closed LiamCottrell closed 5 years ago

LiamCottrell commented 5 years ago

Attempting to make from the latest master 01845e9245552bc4b464b0de3a9b98af7bb1d134 on a rpi running debian v 8.0, Raspbian GNU/Linux 8 (jessie).

cc -c -o wii-u-gc-adapter.o wii-u-gc-adapter.c -Wall -Wextra -pedantic -Wno-format -std=c99 -I/usr/include/libusb-1.0   -O2

wii-u-gc-adapter.c: In function ‘handle_payload’:
wii-u-gc-adapter.c:310:11: warning: missing braces around initializer [-Wmissing-braces]
    struct input_event events[12+6+1] = {0}; // buttons + axis + syn event
           ^
wii-u-gc-adapter.c:310:11: warning: (near initialization for ‘events[0]’) [-Wmissing-braces]
wii-u-gc-adapter.c:310:11: warning: missing initializer for field ‘type’ of ‘struct input_event’ [-Wmissing-field-initializers]
In file included from wii-u-gc-adapter.c:11:0:
/usr/include/linux/input.h:24:8: note: ‘type’ declared here
  __u16 type;
        ^
wii-u-gc-adapter.c: In function ‘main’:
wii-u-gc-adapter.c:642:14: error: ‘LIBUSB_HOTPLUG_NO_FLAGS’ undeclared (first use in this function)
              LIBUSB_HOTPLUG_NO_FLAGS, 0x057e, 0x0337,
              ^
wii-u-gc-adapter.c:642:14: note: each undeclared identifier is reported only once for each function it appears in
Makefile:16: recipe for target 'wii-u-gc-adapter.o' failed
make: *** [wii-u-gc-adapter.o] Error 1
ToadKing commented 5 years ago

Looks like Debian 8 is on libusb 1.0.19 and that define was added in 1.0.23. It looks like it can be easily worked-around though.