Skip to contentSkip to conversation

package/ndisc6: fix build with musl

PATCH New Fabrice Fontaine 2 participants 2 messages Nov 5, 2019 – Nov 7, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/ndisc6: fix build with musl

Fixes:
- http://autobuild.buildroot.org/results/356a6e2d00b1c5be411f48666c949c791810a5ad

---
 ...ce-tcp.c-do-not-undefine-_GNU_SOURCE.patch | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/ndisc6/0001-src-trace-tcp.c-do-not-undefine-_GNU_SOURCE.patch
package/ndisc6/0001-src-trace-tcp.c-do-not-undefine-_GNU_SOURCE.patch new file +36 -0
new file mode 100644
index 0000000000..2c0977a21b
@@ -0,0 +1,36 @@
+From b2093549844452e674a44038bddc68e249ebebba Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Tue, 5 Nov 2019 20:14:21 +0100
+Subject: [PATCH] src/trace-tcp.c: do not undefine _GNU_SOURCE
+
+Don't undefine _GNU_SOURCE otherwise build with musl will fail on:
+
+src/trace-tcp.c: In function 'send_syn_probe':
+src/trace-tcp.c:52:21: error: invalid application of 'sizeof' to incomplete type 'struct tcphdr'
+  if (plen < sizeof (struct tcphdr))
+                     ^~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/356a6e2d00b1c5be411f48666c949c791810a5ad
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status: sent to remi at remlab.net]
+---
+ src/trace-tcp.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/trace-tcp.c b/src/trace-tcp.c
+index 5aba9d4..1b367ae 100644
+--- a/src/trace-tcp.c
++++ b/src/trace-tcp.c
+@@ -21,7 +21,6 @@
+ # include <config.h>
+ #endif
+ 
+-#undef _GNU_SOURCE
+ #define _DEFAULT_SOURCE 1
+ 
+ #include <string.h>
+-- 
+2.23.0
+
Signature · 1 line
2.23.0
#1 lore raw

PATCH 1/1 package/ndisc6: fix build with musl

Quoted 4 lines · On Tue, 5 Nov 2019 20:21:20 +0100 Fabrice Fontaine…

Fixes:
- http://autobuild.buildroot.org/results/356a6e2d00b1c5be411f48666c949c791810a5ad

Sorry, I saw your patch in patchwork after the same patch from Bernd :-/ Sorry about that, as I should have applied yours, which was submitted earlier.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com