diff --git a/CMakeLists.txt b/CMakeLists.txt index fc90e4be2b0a3..78ff7da591f4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -229,11 +229,13 @@ ELSE() -Wold-style-cast \ -Woverloaded-virtual \ -Wpedantic \ - -Wredundant-decls \ -Wsuggest-override \ -Wunused-macros \ -Wzero-as-null-pointer-constant \ -Wno-unknown-warning-option") + IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES Windows) + SET(CATA_WARNINGS "${CATA_WARNINGS} -Wredundant-decls") + ENDIF() # Compact the whitespace in the warning string string(REGEX REPLACE "[\t ]+" " " CATA_WARNINGS "${CATA_WARNINGS}") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CATA_WARNINGS}") diff --git a/src/posix_time.cpp b/src/posix_time.cpp index bcee8631fc91a..39336a09cf405 100644 --- a/src/posix_time.cpp +++ b/src/posix_time.cpp @@ -1,6 +1,6 @@ #include "posix_time.h" -#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(WINPTHREAD_API) #include int diff --git a/src/posix_time.h b/src/posix_time.h index 5b822e67f070b..6e4a2ee808bf3 100644 --- a/src/posix_time.h +++ b/src/posix_time.h @@ -7,7 +7,7 @@ #include // IWYU pragma: keep -#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(WINPTHREAD_API) /* Windows platforms. */ /* Windows lacks the nanosleep() function. The following code was stuffed