From: Jean Delvare <jdelvare@suse.de>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c-tools: fix feature test macros for glibc >= 2.20
Date: Wed, 3 Aug 2016 13:23:11 +0200 [thread overview]
Message-ID: <20160803132311.59d53ad7@endymion> (raw)
In-Reply-To: <1470213836-2848-1-git-send-email-wsa@the-dreams.de>
Hi Wolfram,
On Wed, 3 Aug 2016 10:43:56 +0200, Wolfram Sang wrote:
> Since glibc 2.20, the usage of _BSD_SOURCE is deprecated. Fix it like
> described here:
>
> https://sourceware.org/glibc/wiki/Release/2.20#Deprecation_of__BSD_SOURCE_and__SVID_SOURCE_feature_macros
>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
> tools/i2cbusses.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/i2cbusses.c b/tools/i2cbusses.c
> index b3093aa..28e3682 100644
> --- a/tools/i2cbusses.c
> +++ b/tools/i2cbusses.c
> @@ -23,7 +23,8 @@
> */
>
> /* For strdup and snprintf */
> -#define _BSD_SOURCE 1
> +#define _BSD_SOURCE 1 /* for glibc < 2.19 */
> +#define _DEFAULT_SOURCE 1 /* for glibc >= 2.20 */
Actually >= 2.19 if I read the web page you mentioned (which has the
same "bug") correctly.
Other than that,
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Again the 3.1 branch would need the same fix.
>
> #include <sys/types.h>
> #include <sys/stat.h>
Thanks,
--
Jean Delvare
SUSE L3 Support
next prev parent reply other threads:[~2016-08-03 11:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 8:43 [PATCH] i2c-tools: fix feature test macros for glibc >= 2.20 Wolfram Sang
2016-08-03 11:23 ` Jean Delvare [this message]
2016-08-09 20:40 ` Wolfram Sang
2016-08-12 18:34 ` Wolfram Sang
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=20160803132311.59d53ad7@endymion \
--to=jdelvare@suse.de \
--cc=linux-i2c@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).