check for timegm in cmake builds

This commit is contained in:
Brent Cook 2015-10-15 14:32:16 -05:00
parent cac089b5d6
commit dadeeb0a2e
2 changed files with 9 additions and 0 deletions

View File

@ -121,6 +121,11 @@ if(HAVE_STRSEP)
add_definitions(-DHAVE_STRSEP)
endif()
check_function_exists(timegm HAVE_TIMEGM)
if(HAVE_TIMEGM)
add_definitions(-DHAVE_TIMEGM)
endif()
check_function_exists(arc4random_buf HAVE_ARC4RANDOM_BUF)
if(HAVE_ARC4RANDOM_BUF)
add_definitions(-DHAVE_ARC4RANDOM_BUF)

View File

@ -596,6 +596,10 @@ if(NOT HAVE_STRNDUP)
endif()
endif()
if(NOT HAVE_TIMEGM)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/timegm.c)
endif()
if(NOT HAVE_EXPLICIT_BZERO)
if(CMAKE_HOST_WIN32)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/explicit_bzero_win.c)