#undef _POSIX_C_SOURCE if already defined

This commit is contained in:
Nick Terrell
2017-02-08 17:25:01 -08:00
parent 60259eb9a0
commit a0f9006e5a
+3
View File
@@ -77,6 +77,9 @@ extern "C" {
# define PLATFORM_POSIX_VERSION 200112L # define PLATFORM_POSIX_VERSION 200112L
# else # else
# if defined(__linux__) || defined(__linux) # if defined(__linux__) || defined(__linux)
# ifdef _POSIX_C_SOURCE
# undef _POSIX_C_SOURCE
# endif
# define _POSIX_C_SOURCE 200112L /* use feature test macro */ # define _POSIX_C_SOURCE 200112L /* use feature test macro */
# endif # endif
# include <unistd.h> /* declares _POSIX_VERSION */ # include <unistd.h> /* declares _POSIX_VERSION */