aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-11-06 01:39:03 -0800
committerChris Robinson <[email protected]>2013-11-06 01:41:12 -0800
commit414a9edc6e82792c67d204f5080022b7bc690448 (patch)
treef7b4349941d1c9bd39094673c7b955b373ad2a62
parentb84f6d100f3583aef19bb5c61e5d6f6fb1317e2a (diff)
Explicitly define _POSIX_C_SOURCE and _XOPEN_SOURCE
Set them to 200809L and 700 respectively, instead of assuming _GNU_SOURCE will do it.
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e5169e6..abd81fd2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -387,9 +387,9 @@ ENDIF()
# Check if we have Windows headers
CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H -D_WIN32_WINNT=0x0501)
IF(NOT HAVE_WINDOWS_H)
- # _GNU_SOURCE is needed on some systems for extra features
- ADD_DEFINITIONS(-D_GNU_SOURCE=1)
- SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -D_GNU_SOURCE=1")
+ # These are needed on some systems for extra features
+ ADD_DEFINITIONS(-D_GNU_SOURCE=1 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700)
+ SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -D_GNU_SOURCE=1 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700")
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
IF(NOT HAVE_GETTIMEOFDAY)