summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/dhcpdump/0002-fix-strsep-feature-test.patch27
-rw-r--r--package/dhcpdump/dhcpdump.mk5
2 files changed, 4 insertions, 28 deletions
diff --git a/package/dhcpdump/0002-fix-strsep-feature-test.patch b/package/dhcpdump/0002-fix-strsep-feature-test.patch
deleted file mode 100644
index 06bab947c0..0000000000
--- a/package/dhcpdump/0002-fix-strsep-feature-test.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Use the official _BSD_SOURCE feature test macro instead of the meaningless
-HAVE_STRSEP macro in order to detect the availability of strsep().
-
-This allows toolchains supporting strsep() to use it instead of the custom
-implementation from dhcpdump, which also avoids the following error with some
-toolchains:
-
- In file included from dhcpdump.c:30:0:
- dhcpdump.c: At top level:
- strsep.c:65:23: error: register name not specified for ‘delim’
- register const char *delim;
- ^
-
-Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
-
-diff -Nrdup dhcpdump-1.8.orig/dhcpdump.c dhcpdump-1.8/dhcpdump.c
---- dhcpdump-1.8.orig/dhcpdump.c 2008-06-24 05:26:52.000000000 +0200
-+++ dhcpdump-1.8/dhcpdump.c 2011-05-31 19:22:15.987388498 +0200
-@@ -26,7 +26,7 @@
- #include <regex.h>
- #include "dhcp_options.h"
-
--#ifndef HAVE_STRSEP
-+#ifndef _BSD_SOURCE
- #include "strsep.c"
- #endif
-
diff --git a/package/dhcpdump/dhcpdump.mk b/package/dhcpdump/dhcpdump.mk
index 96f231962d..2413812880 100644
--- a/package/dhcpdump/dhcpdump.mk
+++ b/package/dhcpdump/dhcpdump.mk
@@ -15,8 +15,11 @@ ifeq ($(BR2_STATIC_LIBS),y)
DHCPDUMP_LIBS += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
endif
+# glibc, uclibc and musl have strsep()
+DHCPDUMP_CFLAGS = $(TARGET_CFLAGS) -DHAVE_STRSEP
+
define DHCPDUMP_BUILD_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC="$(TARGET_CC) $(TARGET_CFLAGS) \
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC="$(TARGET_CC) $(DHCPDUMP_CFLAGS) \
-D_GNU_SOURCE" LIBS="$(DHCPDUMP_LIBS)"
endef
OpenPOWER on IntegriCloud