Skip to contentSkip to conversation

ipset: fix build with musl

PATCH In review Stijn Tintel 2 participants 3 messages Sep 25, 2017 – Sep 26, 2017 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipset: fix build with musl

Include sys/types.h for u_int8_t and define _GNU_SOURCE for musl to expose it.

Fixes 54802b2c2826 ("Report if the option is supported by a newer kernel release")
---
 src/ipset.c | 2 ++
 1 file changed, 2 insertions(+)
src/ipset.c +2 -0
index 79f56b8..8d70abc 100644
@@ -14,6 +14,8 @@
 #include <stdio.h>			/* fprintf, fgets */
 #include <stdlib.h>			/* exit */
 #include <string.h>			/* str* */
+#define _GNU_SOURCE
+#include <sys/types.h>			/* u_int8_t */
 
 #include <config.h>
 
Signature · 1 line
2.13.5
#1 lore raw

Hi Stijn,

Quoted 15 lines · Stijn Tintel

Include sys/types.h for u_int8_t and define _GNU_SOURCE for musl to expose it.

Fixes 54802b2c2826 ("Report if the option is supported by a newer kernel release")
---
 src/ipset.c | 2 ++
 1 file changed, 2 insertions(+)
src/ipset.c +0 -0
index 79f56b8..8d70abc 100644

src/ipset.c line 21

Quoted 8 lines
src/ipset.c +2 -0
@@ -14,6 +14,8 @@
 #include <stdio.h>			/* fprintf, fgets */
 #include <stdlib.h>			/* exit */
 #include <string.h>			/* str* */
+#define _GNU_SOURCE
+#include <sys/types.h>			/* u_int8_t */
 
 #include <config.h>
 

Patch is applied in ipset git tree, thanks.

Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences

          H-1525 Budapest 114, POB. 49, Hungary
#2 lore raw
Quoted 7 lines · Jozsef Kadlecsik
Quoted 5 lines

Include sys/types.h for u_int8_t and define _GNU_SOURCE for musl to expose it.

Fixes 54802b2c2826 ("Report if the option is supported by a newer kernel release")

Patch is applied in ipset git tree, thanks.

I reverted your patch and applied the proper fix: replaced the last occurence of u_int8_t in the ipset userspace tree with uint8_t.

Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences

          H-1525 Budapest 114, POB. 49, Hungary