diff mbox series

[meta-networking,4/4] dibbler: Fix build with musl

Message ID 20220825000315.285545-4-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,1/4] neon: Upgrade to 0.32.2 | expand

Commit Message

Khem Raj Aug. 25, 2022, 12:03 a.m. UTC
Use _GNU_SOURCE to compile which helps fixing build with musl
add a header reordering patch to again fix another issue with musl
builds

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...-port-linux-Re-order-header-includes.patch | 33 +++++++++++++++++++
 .../dibbler/dibbler_git.bb                    |  2 ++
 2 files changed, 35 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/dibbler/dibbler/0001-port-linux-Re-order-header-includes.patch
diff mbox series

Patch

diff --git a/meta-networking/recipes-connectivity/dibbler/dibbler/0001-port-linux-Re-order-header-includes.patch b/meta-networking/recipes-connectivity/dibbler/dibbler/0001-port-linux-Re-order-header-includes.patch
new file mode 100644
index 0000000000..27a562bf22
--- /dev/null
+++ b/meta-networking/recipes-connectivity/dibbler/dibbler/0001-port-linux-Re-order-header-includes.patch
@@ -0,0 +1,33 @@ 
+From cbb33e1548fe526c3e7dead294617bde1f087ae3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 24 Aug 2022 16:40:38 -0700
+Subject: [PATCH] port-linux: Re-order header includes
+
+linux/if.h when included before net/if.h casues duplicate definitions
+
+Upstream-Status: Iappropriate [Upstream is Dead] 
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Port-linux/interface.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Port-linux/interface.c b/Port-linux/interface.c
+index 18777e91..19aefb2b 100644
+--- a/Port-linux/interface.c
++++ b/Port-linux/interface.c
+@@ -25,7 +25,6 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+-#include <linux/if.h>
+ #include <syslog.h>
+ #include <string.h>
+ #include <errno.h>
+@@ -42,6 +41,7 @@
+ #include <stdarg.h>
+ #include <linux/sockios.h>
+ #include <linux/if_ether.h>
++#include <linux/if.h>
+ 
+ int interface_auto_up = 0;
+ int interface_do_message = 0;
diff --git a/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb b/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb
index bdda35a24b..f57767e9b8 100644
--- a/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb
+++ b/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb
@@ -9,6 +9,7 @@  SRCREV = "a7c6cf58a88a510cb00841351e75030ce78d36bf"
 
 SRC_URI = "git://github.com/tomaszmrugalski/dibbler;branch=master;protocol=https \
            file://dibbler_fix_getSize_crash.patch \
+           file://0001-port-linux-Re-order-header-includes.patch \
            "
 PV = "1.0.1+1.0.2RC1+git${SRCREV}"
 
@@ -29,6 +30,7 @@  inherit autotools
 
 DEPENDS += "flex-native"
 
+CFLAGS += "-D_GNU_SOURCE"
 LDFLAGS += "-pthread"
 
 PACKAGES =+ "${PN}-requestor ${PN}-client ${PN}-relay ${PN}-server"