Index: libcxx/src/chrono.cpp =================================================================== --- libcxx/src/chrono.cpp +++ libcxx/src/chrono.cpp @@ -28,7 +28,7 @@ # include # endif #else -# if !defined(CLOCK_REALTIME) +# if !defined(CLOCK_REALTIME) || !defined(_LIBCPP_USE_CLOCK_GETTIME) # include // for gettimeofday and timeval # endif // !defined(CLOCK_REALTIME) #endif // defined(_LIBCPP_WIN32API) @@ -74,7 +74,7 @@ static_cast<__int64>(ft.dwLowDateTime)}; return time_point(duration_cast(d - nt_to_unix_epoch)); #else -#if defined(CLOCK_REALTIME) +#if defined(CLOCK_REALTIME) && defined(_LIBCPP_USE_CLOCK_GETTIME) struct timespec tp; if (0 != clock_gettime(CLOCK_REALTIME, &tp)) __throw_system_error(errno, "clock_gettime(CLOCK_REALTIME) failed");