From: Antonio Ospite Date: Wed, 29 Jun 2016 17:35:21 +0000 (+0200) Subject: examples/CMakeLists.txt: clean up Feature Test Macro Requirements defines X-Git-Tag: v0.1.7~38 X-Git-Url: https://git.ao2.it/libam7xxx.git/commitdiff_plain/74b58c54e60a2fe4e44e1b1bca4ef3f9cfd95f5e 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. --- 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/)