aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Benoît Thébaudeau <benoit.thebaudeau@advansee.com>2014-08-05 14:12:29 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-08-07 22:19:21 +0200
commitc2a7f0d6051f71f3bb9d83b574d70814339e4b95 (patch)
tree8c73e942c1b3a68dcc9f6fa269757919181e9279
parentbc6b399366bcdfa7432ec5d10865753ad24b0a1e (diff)
downloadbuildroot-c2a7f0d6051f71f3bb9d83b574d70814339e4b95.tar.gz
buildroot-c2a7f0d6051f71f3bb9d83b574d70814339e4b95.tar.bz2
dhcpdump: Fix strsep() feature test
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> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/dhcpdump/dhcpdump-0002-fix-strsep-feature-test.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/package/dhcpdump/dhcpdump-0002-fix-strsep-feature-test.patch b/package/dhcpdump/dhcpdump-0002-fix-strsep-feature-test.patch
new file mode 100644
index 0000000000..06bab947c0
--- /dev/null
+++ b/package/dhcpdump/dhcpdump-0002-fix-strsep-feature-test.patch
@@ -0,0 +1,27 @@
+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
+