From c8508c9b7d9e019ebef1ca287786a4c8d78c0dcf Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Sun, 20 Oct 2019 16:27:26 +0200 Subject: Fix building with recent gcc and glibc getaddrinfo needs _POSIX_C_SOURCE >= 200112L since glibc 2.22. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- cgit v1.2.3