diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e8a21feaf..2273dc0402 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ include(CheckCXXCompilerFlag) # We call fread numerous times without checking return values. Hide the # corresponding compiler warnings if the compiler supports doing so. -CHECK_CXX_COMPILER_FLAG(-Wno-unused-result NO_UNUSED_RESULT) +CHECK_CXX_COMPILER_FLAG(-Wunused-result NO_UNUSED_RESULT) if(NO_UNUSED_RESULT) add_definitions(-Wno-unused-result) endif(NO_UNUSED_RESULT) diff --git a/Source/Core/Common/Src/Thread.h b/Source/Core/Common/Src/Thread.h index 04e6214b46..e93cf20160 100644 --- a/Source/Core/Common/Src/Thread.h +++ b/Source/Core/Common/Src/Thread.h @@ -63,7 +63,7 @@ //for (clock_gettime|gettimeofday) and struct time(spec|val) #include #include -#if !defined(_POSIX_TIMERS) || _POSIX_TIMERS == 0 +#if !defined(_POSIX_TIMERS) || _POSIX_TIMERS == 0 || !defined(_POSIX_MONOTONIC_CLOCK) #define USE_GETTIMEOFDAY #include #endif diff --git a/Source/Core/Common/Src/Timer.cpp b/Source/Core/Common/Src/Timer.cpp index 6583202f99..1533ae71b5 100644 --- a/Source/Core/Common/Src/Timer.cpp +++ b/Source/Core/Common/Src/Timer.cpp @@ -23,7 +23,7 @@ #include #else #include -#if !defined(_POSIX_TIMERS) || _POSIX_TIMERS == 0 +#if !defined(_POSIX_TIMERS) || _POSIX_TIMERS == 0 || !defined(_POSIX_MONOTONIC_CLOCK) #define USE_GETTIMEOFDAY #include #endif