#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

View File

@ -77,6 +77,9 @@ extern "C" {
# define PLATFORM_POSIX_VERSION 200112L
# else
# if defined(__linux__) || defined(__linux)
# ifdef _POSIX_C_SOURCE
# undef _POSIX_C_SOURCE
# endif
# define _POSIX_C_SOURCE 200112L /* use feature test macro */
# endif
# include <unistd.h> /* declares _POSIX_VERSION */