sispmctl: fix compilation error with musl
authorRichard Kunze <redacted>
Sun, 16 Nov 2014 09:47:10 +0000 (10:47 +0100)
committerRichard Kunze <redacted>
Sun, 16 Nov 2014 09:47:10 +0000 (10:47 +0100)
Unpatched compile fails because <sys/types.h> is not included
in <usb.h> (provided by "libusb-compat") and consequently
the 'u_int*_t' types are not found.

This should probably better be fixed in the core "libusb-compat"
package instead.

Signed-off-by: Richard Kunze <redacted>
utils/sispmctl/Makefile
utils/sispmctl/patches/001-fix-includes.patch [new file with mode: 0644]

index 87e15f58fa958f6f5277044f7b0a5aadd5b58cc8..ad6c1e3523f3af9c2d79d7f7aaad71fa47d7c789 100644 (file)
@@ -43,6 +43,7 @@ define Package/sispmctl/description
  multiple SIS-PM devices, too.
 endef
 
+TARGET_CFLAGS += -D_GNU_SOURCE
 CONFIGURE_ARGS += \
        --enable-webless \
        --disable-dependency-tracking
diff --git a/utils/sispmctl/patches/001-fix-includes.patch b/utils/sispmctl/patches/001-fix-includes.patch
new file mode 100644 (file)
index 0000000..218e22e
--- /dev/null
@@ -0,0 +1,25 @@
+--- a/src/sispm_ctl.c
++++ b/src/sispm_ctl.c
+@@ -33,6 +33,7 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <time.h>
++#include <sys/types.h>
+ #include <usb.h>
+ #include <assert.h>
+ #include "sispm_ctl.h"
+--- a/src/main.c
++++ b/src/main.c
+@@ -34,11 +34,11 @@
+ #define __USE_XOPEN
+ #include <time.h>
+ #include <signal.h>
+-#include <usb.h>
+ #include <assert.h>
+ #include <getopt.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <usb.h>
+ #include <fcntl.h>
git clone https://git.99rst.org/PROJECT