From patchwork Tue Aug 5 12:12:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Beno=C3=AEt_Th=C3=A9baudeau?= X-Patchwork-Id: 376680 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 46686140116 for ; Tue, 5 Aug 2014 22:12:51 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3BEA28AE1A; Tue, 5 Aug 2014 12:12:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j09WbjRwoDY2; Tue, 5 Aug 2014 12:12:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id A70D98AE7A; Tue, 5 Aug 2014 12:12:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id ACD5E1BF98D for ; Tue, 5 Aug 2014 12:12:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A86E38BA3B for ; Tue, 5 Aug 2014 12:12:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GGJV3UtGHUVE for ; Tue, 5 Aug 2014 12:12:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from zose-mta05.web4all.fr (zose-mta05.web4all.fr [185.49.20.45]) by whitealder.osuosl.org (Postfix) with ESMTP id 3605E8BA29 for ; Tue, 5 Aug 2014 12:12:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zose-mta05.web4all.fr (Postfix) with ESMTP id 2B4F3439D6 for ; Tue, 5 Aug 2014 14:12:42 +0200 (CEST) Received: from zose-mta05.web4all.fr ([127.0.0.1]) by localhost (zose-mta05.web4all.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id lRQqNSGk8pfO; Tue, 5 Aug 2014 14:12:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zose-mta05.web4all.fr (Postfix) with ESMTP id 2008E4397E; Tue, 5 Aug 2014 14:12:38 +0200 (CEST) X-Virus-Scanned: amavisd-new at zose-mta-05.w4a.fr Received: from zose-mta05.web4all.fr ([127.0.0.1]) by localhost (zose-mta05.web4all.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id moyecuzGL101; Tue, 5 Aug 2014 14:12:38 +0200 (CEST) Received: from localhost.localdomain (cie44-1-88-188-188-147.fbx.proxad.net [88.188.188.147]) by zose-mta05.web4all.fr (Postfix) with ESMTPSA id D7C0E439C8; Tue, 5 Aug 2014 14:12:37 +0200 (CEST) From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= To: Date: Tue, 5 Aug 2014 14:12:29 +0200 Message-Id: <1407240749-17574-2-git-send-email-benoit.thebaudeau@advansee.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1407240749-17574-1-git-send-email-benoit.thebaudeau@advansee.com> References: <1407240749-17574-1-git-send-email-benoit.thebaudeau@advansee.com> MIME-Version: 1.0 Cc: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= Subject: [Buildroot] [PATCH v2 2/2] dhcpdump: Fix strsep() feature test X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net 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 --- Changes in v2: - Fix patch file name according to patch naming convention. - Add description and Sob line to patch. --- .../dhcpdump-0002-fix-strsep-feature-test.patch | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 package/dhcpdump/dhcpdump-0002-fix-strsep-feature-test.patch 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 0000000..06bab94 --- /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 + +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 + #include "dhcp_options.h" + +-#ifndef HAVE_STRSEP ++#ifndef _BSD_SOURCE + #include "strsep.c" + #endif +