Reverted commit D3427621
authorMichael Lee <mzlee@fb.com>
Tue, 14 Jun 2016 00:50:11 +0000 (17:50 -0700)
committerFacebook Github Bot 9 <facebook-github-bot-9-bot@fb.com>
Tue, 14 Jun 2016 00:53:29 +0000 (17:53 -0700)
Summary: The iOS sdk adds `clock_gettime` support.

Reviewed By: clementgenzmer

Differential Revision: D3427621

fbshipit-source-id: 534276ba1e0ade185e3af0665f419f3c51d3f980

folly/portability/Time.cpp
folly/portability/Time.h

index ea6d4ef05fc057f58a687a2b18384162c1651762..a9160356f33fb7983b1dc76e8cb48a513a115de1 100755 (executable)
@@ -17,7 +17,7 @@
 #include <folly/portability/Time.h>
 
 #if !FOLLY_HAVE_CLOCK_GETTIME
-#if __MACH__ && !defined(__CLOCK_AVAILABILITY)
+#if __MACH__
 #include <errno.h>
 #include <mach/mach_time.h>
 
index b3dfa68840f24a3ab731782134023e60e3ed0130..642a95de59e06365b01dbde8c9fe18987865014d 100755 (executable)
 
 #include <folly/portability/Config.h>
 
-// These aren't generic implementations, so we can only declare them
-// on platforms we support.  Apple started defining clock_gettime in
-// iOS 10 / OSX 12 and is gated via __CLOCK_AVAILABILITY.
-#if !FOLLY_HAVE_CLOCK_GETTIME && \
-    (defined(_WIN32) || (defined(__MACH__) && !defined(__CLOCK_AVAILABILITY)))
+// These aren't generic implementations, so we can only declare them on
+// platforms we support.
+#if !FOLLY_HAVE_CLOCK_GETTIME && (defined(__MACH__) || defined(_WIN32))
 #define CLOCK_REALTIME 0
 // The Windows implementation supports a few other
 // clock types as well.