From 3acc51f73ca8c6ed2dda8cb471c1d2b5df28995e Mon Sep 17 00:00:00 2001 From: Hugues Delorme Date: Fri, 23 Dec 2016 22:16:12 +0100 Subject: [PATCH] cmake: force POSIX with gcc --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 24e027b..7f2637e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,6 +125,7 @@ test_big_endian(GMIO_HOST_IS_BIG_ENDIAN) # Adapt C compiler flags to enable strict ISO C99 conformance if(CMAKE_C_COMPILER_IS_GCC_COMPATIBLE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic-errors") + add_definitions(-D_POSIX_SOURCE) endif() set(CMAKE_REQUIRED_FLAGS "${CMAKE_C_FLAGS}")