74b7495f93
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
22 lines
371 B
C
22 lines
371 B
C
#ifndef __HIREDIS_FMACRO_H
|
|
#define __HIREDIS_FMACRO_H
|
|
|
|
#if defined(__linux__)
|
|
#define _BSD_SOURCE
|
|
#define _DEFAULT_SOURCE
|
|
#endif
|
|
|
|
#if defined(__sun__)
|
|
#define _POSIX_C_SOURCE 200112L
|
|
#elif defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
|
#define _XOPEN_SOURCE 600
|
|
#else
|
|
#define _XOPEN_SOURCE
|
|
#endif
|
|
|
|
#if __APPLE__ && __MACH__
|
|
#define _OSX
|
|
#endif
|
|
|
|
#endif
|