From a3541796ffca0ed4aa59e92be9a622ed140afdb8 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Wed, 3 Aug 2016 10:41:41 +0200 Subject: [PATCH] i2c-tools: fix feature test macros for glibc >= 2.20 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 Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang --- 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 #include