From 414a9edc6e82792c67d204f5080022b7bc690448 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 6 Nov 2013 01:39:03 -0800 Subject: Explicitly define _POSIX_C_SOURCE and _XOPEN_SOURCE Set them to 200809L and 700 respectively, instead of assuming _GNU_SOURCE will do it. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3