summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Stancliff <matt@genges.com>2015-01-06 17:46:13 -0500
committerMatt Stancliff <matt@genges.com>2015-01-06 17:55:55 -0500
commit74b7495f9308f2c183ff24fa482c5304a444cd90 (patch)
tree213114407f9d8b289cadc6854c5922160786c0d7
parentf28872ca704ea162d970251ad20d1a0752506cfc (diff)
Silence _BSD_SOURCE warnings
glibc 2.20 requires _DEFAULT_SOURCE and doesn't like _BSD_SOURCE alone Also see: - https://github.com/antirez/redis/pull/2189 - https://sourceware.org/glibc/wiki/Release/2.20#Deprecation_of__BSD_SOURCE_and__SVID_SOURCE_feature_macros Thanks to badboy for pointing out the problem at https://github.com/redis/hiredis/issues/288#issuecomment-68849454
-rw-r--r--fmacros.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fmacros.h b/fmacros.h
index 9e5fec0..19d7b21 100644
--- a/fmacros.h
+++ b/fmacros.h
@@ -1,8 +1,9 @@
#ifndef __HIREDIS_FMACRO_H
#define __HIREDIS_FMACRO_H
-#if !defined(_BSD_SOURCE)
+#if defined(__linux__)
#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
#endif
#if defined(__sun__)