OSDN Git Service

Fix mac build: include <sys/time.h> in time_utils.cc .
authorVladimir Marko <vmarko@google.com>
Tue, 26 May 2015 18:57:30 +0000 (19:57 +0100)
committerVladimir Marko <vmarko@google.com>
Tue, 26 May 2015 19:12:19 +0000 (20:12 +0100)
Required for gettimeofday(). Not needed in utils.cc .

Bug: 13925192
Change-Id: If06840d8a47c9193ccc7bd4cee5c16fcf76d9729

runtime/base/time_utils.cc
runtime/utils.cc

index 29b849e..48b0a09 100644 (file)
 #include "base/logging.h"
 #include "base/stringprintf.h"
 
+#if defined(__APPLE__)
+#include <sys/time.h>
+#endif
+
 namespace art {
 
 std::string PrettyDuration(uint64_t nano_duration, size_t max_fraction_digits) {
index fabf9bd..2671b46 100644 (file)
@@ -42,7 +42,6 @@
 #if defined(__APPLE__)
 #include "AvailabilityMacros.h"  // For MAC_OS_X_VERSION_MAX_ALLOWED
 #include <sys/syscall.h>
-#include <sys/time.h>
 #endif
 
 #include <backtrace/Backtrace.h>  // For DumpNativeStack.