summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2016-08-03 10:41:41 +0200
committerWolfram Sang <wsa@the-dreams.de>2016-08-12 20:33:42 +0200
commit119a811034fcd6587ce69818391d5eb92e9840bb (patch)
treeefa58cc59baaf6ceb4061e0cde51e91c953cd5e0
parentdc95875dbcaaeb3a8fa28277512eebf12b82d213 (diff)
downloadi2c-tools-git-119a811034fcd6587ce69818391d5eb92e9840bb.tar.gz
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 <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r--tools/i2cbusses.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/i2cbusses.c b/tools/i2cbusses.c
index 7a1b7cb..eaca884 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>