diff options
author | Brent Cook <bcook@openbsd.org> | 2015-10-15 14:32:16 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2015-10-15 14:32:16 -0500 |
commit | dadeeb0a2ed5e21bb90bb819a13c1bf9f4d1accf (patch) | |
tree | 5152db9296cd294ab4e35fe5d7a57fda56044d65 | |
parent | cac089b5d6f4b0237f8221d18079735f1d3e7c72 (diff) | |
download | portable-dadeeb0a2ed5e21bb90bb819a13c1bf9f4d1accf.tar.gz portable-dadeeb0a2ed5e21bb90bb819a13c1bf9f4d1accf.tar.bz2 portable-dadeeb0a2ed5e21bb90bb819a13c1bf9f4d1accf.zip |
check for timegm in cmake builds
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | crypto/CMakeLists.txt | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ed9cb1f..e4cf7ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -121,6 +121,11 @@ if(HAVE_STRSEP) | |||
121 | add_definitions(-DHAVE_STRSEP) | 121 | add_definitions(-DHAVE_STRSEP) |
122 | endif() | 122 | endif() |
123 | 123 | ||
124 | check_function_exists(timegm HAVE_TIMEGM) | ||
125 | if(HAVE_TIMEGM) | ||
126 | add_definitions(-DHAVE_TIMEGM) | ||
127 | endif() | ||
128 | |||
124 | check_function_exists(arc4random_buf HAVE_ARC4RANDOM_BUF) | 129 | check_function_exists(arc4random_buf HAVE_ARC4RANDOM_BUF) |
125 | if(HAVE_ARC4RANDOM_BUF) | 130 | if(HAVE_ARC4RANDOM_BUF) |
126 | add_definitions(-DHAVE_ARC4RANDOM_BUF) | 131 | add_definitions(-DHAVE_ARC4RANDOM_BUF) |
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index 3326dd7..792041e 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt | |||
@@ -596,6 +596,10 @@ if(NOT HAVE_STRNDUP) | |||
596 | endif() | 596 | endif() |
597 | endif() | 597 | endif() |
598 | 598 | ||
599 | if(NOT HAVE_TIMEGM) | ||
600 | set(CRYPTO_SRC ${CRYPTO_SRC} compat/timegm.c) | ||
601 | endif() | ||
602 | |||
599 | if(NOT HAVE_EXPLICIT_BZERO) | 603 | if(NOT HAVE_EXPLICIT_BZERO) |
600 | if(CMAKE_HOST_WIN32) | 604 | if(CMAKE_HOST_WIN32) |
601 | set(CRYPTO_SRC ${CRYPTO_SRC} compat/explicit_bzero_win.c) | 605 | set(CRYPTO_SRC ${CRYPTO_SRC} compat/explicit_bzero_win.c) |