[libcxx] r291517 - [Chrono][Darwin] Include header for gettimeofday

Bruno Cardoso Lopes via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 9 16:51:03 PST 2017


Author: bruno
Date: Mon Jan  9 18:51:02 2017
New Revision: 291517

URL: http://llvm.org/viewvc/llvm-project?rev=291517&view=rev
Log:
[Chrono][Darwin] Include header for gettimeofday

Followup on r291466 and include the proper header. This fixes:
https://build.chromium.org/p/chromium.fyi/builders/ClangToTMac/builds/12620/steps/gclient%20runhooks/logs/stdio

Modified:
    libcxx/trunk/src/chrono.cpp

Modified: libcxx/trunk/src/chrono.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/chrono.cpp?rev=291517&r1=291516&r2=291517&view=diff
==============================================================================
--- libcxx/trunk/src/chrono.cpp (original)
+++ libcxx/trunk/src/chrono.cpp Mon Jan  9 18:51:02 2017
@@ -42,7 +42,7 @@
 #include <winapifamily.h>
 #endif
 #else
-#if !defined(CLOCK_REALTIME)
+#if !defined(CLOCK_REALTIME) || !defined(_LIBCXX_USE_CLOCK_GETTIME)
 #include <sys/time.h>        // for gettimeofday and timeval
 #endif // !defined(CLOCK_REALTIME)
 #endif // defined(_LIBCPP_WIN32API)




More information about the cfe-commits mailing list