Skip to content

Commit

Permalink
CMake: Define _ISOC11_SOURCE for glibc
Browse files Browse the repository at this point in the history
This is required to expose aligned_alloc.
  • Loading branch information
dscharrer committed Jul 25, 2016
1 parent 442ba4a commit 6cb8d79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -540,7 +540,7 @@ else(MSVC)
# Define _POSIX_C_SOURCE and _XOPEN_SOURCE for GNU systems
if(CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "GNU"
OR CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
set(CMAKE_REQUIRED_DEFINITIONS "-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=600")
set(CMAKE_REQUIRED_DEFINITIONS "-D_ISOC11_SOURCE -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=600")
add_definitions(-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=600)
if(CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_BSD_SOURCE")
Expand Down

0 comments on commit 6cb8d79

Please sign in to comment.