diff options
author | João Valverde <j@v6e.pt> | 2021-12-27 02:03:26 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2021-12-27 14:07:32 +0000 |
commit | 0d5bfd44a87e4648cd159e56f4b8ca7cd8d73b57 (patch) | |
tree | 0399367c67c75d621420715bbf6f5046572511ff /ConfigureChecks.cmake | |
parent | b83cefd2fe9bfaad04542c14cbf8b1e2c6ed5454 (diff) |
Use a wrapper function to call strptime()
Encapsulate the feature requirements for strptime() in a
portability wrapper.
Use _GNU_SOURCE to expose strptime. It should be enough on glibc
without the side-effect of selecting a particular SUS version,
which we don't need and might hide other definitions.
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index b379666e15..b52b7c3fac 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -87,7 +87,6 @@ check_function_exists("getifaddrs" HAVE_GETIFADDRS) check_function_exists("issetugid" HAVE_ISSETUGID) check_function_exists("setresgid" HAVE_SETRESGID) check_function_exists("setresuid" HAVE_SETRESUID) -check_function_exists("strptime" HAVE_STRPTIME) if (APPLE) cmake_push_check_state() set(CMAKE_REQUIRED_LIBRARIES ${APPLE_CORE_FOUNDATION_LIBRARY}) @@ -99,6 +98,7 @@ if(UNIX) list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE) check_symbol_exists("memmem" "string.h" HAVE_MEMMEM) check_symbol_exists("strcasestr" "string.h" HAVE_STRCASESTR) + check_symbol_exists("strptime" "time.h" HAVE_STRPTIME) check_symbol_exists("vasprintf" "stdio.h" HAVE_VASPRINTF) cmake_pop_check_state() endif() |