From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-i2c@vger.kernel.org
Cc: Jean Delvare <jdelvare@suse.de>,
Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: [PATCH v2] i2c-tools: fix feature test macros for glibc >= 2.20
Date: Tue, 9 Aug 2016 22:53:01 +0200 [thread overview]
Message-ID: <1470775982-16231-1-git-send-email-wsa+renesas@sang-engineering.com> (raw)
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+renesas@sang-engineering.com>
---
tools/i2cbusses.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/i2cbusses.c b/tools/i2cbusses.c
index b3093aa..dad22ea 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.19 */
#include <sys/types.h>
#include <sys/stat.h>
--
2.8.1
reply other threads:[~2016-08-09 20:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1470775982-16231-1-git-send-email-wsa+renesas@sang-engineering.com \
--to=wsa+renesas@sang-engineering.com \
--cc=jdelvare@suse.de \
--cc=linux-i2c@vger.kernel.org \
/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).