From 74b58c54e60a2fe4e44e1b1bca4ef3f9cfd95f5e Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Wed, 29 Jun 2016 19:35:21 +0200 Subject: [PATCH 1/1] examples/CMakeLists.txt: clean up Feature Test Macro Requirements defines Setting _POSIX_C_SOURCE to the right value enables all the needed functionalities. This also avoids using _DEFAULT_SOURCE explicitly to get rid of the _BSD_SOURCE deprecation warning. --- examples/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index c563f5f..f076b19 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,7 +1,5 @@ include(CheckSymbolExists) -add_definitions("-D_POSIX_C_SOURCE=2") # for getopt() -add_definitions("-D_POSIX_SOURCE") # for sigaction -add_definitions("-D_BSD_SOURCE") # for strdup +add_definitions("-D_POSIX_C_SOURCE=200809L") # for getopt(), sigaction(), and strdup() include_directories(${CMAKE_SOURCE_DIR}/src/) -- 2.1.4