diff --git a/Source/Common/CMakeLists.txt b/Source/Common/CMakeLists.txt index d635692e6..c937ea5a4 100644 --- a/Source/Common/CMakeLists.txt +++ b/Source/Common/CMakeLists.txt @@ -49,7 +49,7 @@ unset(CMAKE_REQUIRED_INCLUDES) unset(CMAKE_REQUIRED_LIBRARIES) #include(CheckSymbolExists) -CHECK_FUNCTION_EXISTS(gettimeofday GDCM_HAVE_GETTIMEOFDAY) +CHECK_SYMBOL_EXISTS(gettimeofday "sys/time.h" GDCM_HAVE_GETTIMEOFDAY) # json-c API changed: if(GDCM_USE_SYSTEM_JSON) set(CMAKE_REQUIRED_INCLUDES ${JSON_INCLUDE_DIRS})