diff --git a/libcxx/src/chrono.cpp b/libcxx/src/chrono.cpp --- a/libcxx/src/chrono.cpp +++ b/libcxx/src/chrono.cpp @@ -12,9 +12,13 @@ #include // clock_gettime, CLOCK_MONOTONIC and CLOCK_REALTIME #include "include/apple_availability.h" -#if !defined(__APPLE__) +#if !defined(_WIN32) +#include +#endif + +#if !defined(__APPLE__) && _POSIX_TIMERS > 0 #define _LIBCPP_USE_CLOCK_GETTIME -#endif // __APPLE__ +#endif #if defined(_LIBCPP_WIN32API) #define WIN32_LEAN_AND_MEAN diff --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp --- a/libcxx/src/filesystem/operations.cpp +++ b/libcxx/src/filesystem/operations.cpp @@ -36,7 +36,11 @@ #define _LIBCPP_USE_COPYFILE #endif -#if !defined(__APPLE__) +#if !defined(_WIN32) +#include +#endif + +#if !defined(__APPLE__) && _POSIX_TIMERS > 0 #define _LIBCPP_USE_CLOCK_GETTIME #endif