* [PATCH v2] i2c-tools: fix feature test macros for glibc >= 2.20
@ 2016-08-09 20:53 Wolfram Sang
0 siblings, 0 replies; only message in thread
From: Wolfram Sang @ 2016-08-09 20:53 UTC (permalink / raw)
To: linux-i2c; +Cc: Jean Delvare, Wolfram Sang
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-09 20:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-09 20:53 [PATCH v2] i2c-tools: fix feature test macros for glibc >= 2.20 Wolfram Sang
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).