summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReiner Herrmann <reiner@reiner-h.de>2019-10-20 16:27:26 +0200
committerReiner Herrmann <reiner@reiner-h.de>2019-10-20 16:27:26 +0200
commitc8508c9b7d9e019ebef1ca287786a4c8d78c0dcf (patch)
treebff79924fa4f7b73f2609dfc5af1682fcf410b08
parent2d87584077f3b5634953f24ec6508cc54712b0d5 (diff)
Fix building with recent gcc and glibcHEADmaster
getaddrinfo needs _POSIX_C_SOURCE >= 200112L since glibc 2.22.
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 295fa9c..f02a38d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,7 @@ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
endif(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
# Set C compiler flags
-set(CMAKE_C_FLAGS "-Wall -pedantic -std=c99 -D_POSIX_SOURCE")
+set(CMAKE_C_FLAGS "-Wall -pedantic -std=c99 -D_POSIX_C_SOURCE=200112L")
set(CMAKE_C_FLAGS_RELEASE "-O3")
set(CMAKE_C_FLAGS_DEBUG "-O0 -g")