dibbler: Fix build with musl

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>
This commit is contained in:
Khem Raj 2022-08-24 16:54:40 -07:00
parent c939359a02
commit 68c96b4ac3
2 changed files with 35 additions and 0 deletions

View File

@ -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;

View File

@ -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"