diff --git a/apps/openssl/CMakeLists.txt b/apps/openssl/CMakeLists.txt index db63ecf..6d89c06 100644 --- a/apps/openssl/CMakeLists.txt +++ b/apps/openssl/CMakeLists.txt @@ -67,6 +67,13 @@ else() set(OPENSSL_SRC ${OPENSSL_SRC} compat/strtonum.c) endif() +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + check_function_exists(clock_gettime HAVE_CLOCK_GETTIME) + if(NOT HAVE_CLOCK_GETTIME) + set(OPENSSL_SRC ${OPENSSL_SRC} compat/clock_gettime_osx.c) + endif() +endif() + add_executable(openssl ${OPENSSL_SRC}) target_include_directories(openssl PRIVATE . ../../include/compat) target_link_libraries(openssl ${OPENSSL_LIBS})