Bladeren bron

sispmctl: fix compilation error with musl

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 <richard.kunze@web.de>
Richard Kunze 10 jaren geleden
bovenliggende
commit
773f8d4b13
2 gewijzigde bestanden met toevoegingen van 26 en 0 verwijderingen
  1. 1
    0
      utils/sispmctl/Makefile
  2. 25
    0
      utils/sispmctl/patches/001-fix-includes.patch

+ 1
- 0
utils/sispmctl/Makefile Bestand weergeven

@@ -43,6 +43,7 @@ define Package/sispmctl/description
43 43
  multiple SIS-PM devices, too.
44 44
 endef
45 45
 
46
+TARGET_CFLAGS += -D_GNU_SOURCE
46 47
 CONFIGURE_ARGS += \
47 48
 	--enable-webless \
48 49
 	--disable-dependency-tracking

+ 25
- 0
utils/sispmctl/patches/001-fix-includes.patch Bestand weergeven

@@ -0,0 +1,25 @@
1
+--- a/src/sispm_ctl.c
2
++++ b/src/sispm_ctl.c
3
+@@ -33,6 +33,7 @@
4
+ #include <stdlib.h>
5
+ #include <unistd.h>
6
+ #include <time.h>
7
++#include <sys/types.h>
8
+ #include <usb.h>
9
+ #include <assert.h>
10
+ #include "sispm_ctl.h"
11
+--- a/src/main.c
12
++++ b/src/main.c
13
+@@ -34,11 +34,11 @@
14
+ #define __USE_XOPEN
15
+ #include <time.h>
16
+ #include <signal.h>
17
+-#include <usb.h>
18
+ #include <assert.h>
19
+ #include <getopt.h>
20
+ #include <sys/types.h>
21
+ #include <sys/socket.h>
22
++#include <usb.h>
23
+ 
24
+ #include <fcntl.h>
25
+