systemclock: No need to check for CLOCK_TAI in the meson
authorOlivier CrĂȘte <olivier.crete@collabora.com>
Fri, 27 Dec 2019 17:36:10 +0000 (12:36 -0500)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 27 Jan 2020 17:16:14 +0000 (17:16 +0000)
POSIX defines CLOCK_MONOTONIC to always be a macro, so I think
it's safe to assume that CLOCK_TAI will also be.

gst/gstsystemclock.c
meson.build

index 9b1a82e..adfc117 100644 (file)
@@ -561,7 +561,7 @@ clock_type_to_posix_id (GstClockType clock_type)
   else
 #endif
   if (clock_type == GST_CLOCK_TYPE_TAI)
-#ifdef HAVE_TAI_CLOCK
+#ifdef CLOCK_TAI
     return CLOCK_TAI;
 #else
     GST_ERROR
index 69b3a2c..a35188c 100644 (file)
@@ -256,7 +256,7 @@ if cc.links('''#include <pthread.h>
   cdata.set('HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID', 1)
 endif
 
-# Check for posix timers, monotonic clock and TAI clock
+# Check for posix timers and monotonic clock
 time_prefix = '#include <time.h>\n'
 if cdata.has('HAVE_UNISTD_H')
   time_prefix += '#include <unistd.h>'
@@ -280,15 +280,6 @@ if cc.compiles(monotonic_clock_src, name : 'monotonic clock from time.h')
   cdata.set('HAVE_MONOTONIC_CLOCK', 1)
 endif
 
-tai_clock_src = time_prefix + '''
-#if !defined(CLOCK_TAI)
-#error CLOCK_TAI not defined
-#endif
-'''
-if cc.compiles(tai_clock_src, name : 'TAI clock from time.h')
-  cdata.set('HAVE_TAI_CLOCK', 1)
-endif
-
 # Check for __uint128_t (gcc) by checking for 128-bit division
 uint128_t_src = '''int main() {
 static __uint128_t v1 = 100;