Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] dhcpdump: Fix strsep() feature test
Date: Mon, 4 Aug 2014 21:36:31 +0200	[thread overview]
Message-ID: <20140804213631.4f4b5d2a@free-electrons.com> (raw)
In-Reply-To: <1407176414-13376-1-git-send-email-benoit.thebaudeau@advansee.com>

Dear Beno?t Th?baudeau,

On Mon,  4 Aug 2014 20:20:14 +0200, Beno?t Th?baudeau wrote:

> diff --git a/package/dhcpdump/dhcpdump-1.8-fix-strsep-feature-test.patch b/package/dhcpdump/dhcpdump-1.8-fix-strsep-feature-test.patch
> new file mode 100644
> index 0000000..10b826c
> --- /dev/null
> +++ b/package/dhcpdump/dhcpdump-1.8-fix-strsep-feature-test.patch

All patches should have a description + Signed-off-by. Also, you should
use the proper naming convention for patches:

	<package>-<sequencenumber>-<description>.patch

I know there's already a patch for dhcpdump that doesn't follow this
convention, but you're invited to rename it as well :-)

> @@ -0,0 +1,12 @@
> +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

Is _BSD_SOURCE really meant to be tested within source code? I thought
it was more the application or library that would #define _BSD_SOURCE
or #define _GNU_SOURCE to tell the C library which functions should be
made visible. But well, if strsep() depends on _BSD_SOURCE being
defined, I agree that testing _BSD_SOURCE is a way of knowing whether
it's available or not.

Are there some other opinions about this?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-08-04 19:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04 18:20 [Buildroot] [PATCH 1/1] dhcpdump: Fix strsep() feature test Benoît Thébaudeau
2014-08-04 19:36 ` Thomas Petazzoni [this message]
2014-08-04 20:08   ` Benoît Thébaudeau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140804213631.4f4b5d2a@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox