mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
systemclock: No need to check for CLOCK_TAI in the meson
POSIX defines CLOCK_MONOTONIC to always be a macro, so I think it's safe to assume that CLOCK_TAI will also be.
This commit is contained in:
parent
216d6dd0f0
commit
b4ba9ec089
2 changed files with 2 additions and 11 deletions
|
@ -561,7 +561,7 @@ clock_type_to_posix_id (GstClockType clock_type)
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (clock_type == GST_CLOCK_TYPE_TAI)
|
if (clock_type == GST_CLOCK_TYPE_TAI)
|
||||||
#ifdef HAVE_TAI_CLOCK
|
#ifdef CLOCK_TAI
|
||||||
return CLOCK_TAI;
|
return CLOCK_TAI;
|
||||||
#else
|
#else
|
||||||
GST_ERROR
|
GST_ERROR
|
||||||
|
|
11
meson.build
11
meson.build
|
@ -256,7 +256,7 @@ if cc.links('''#include <pthread.h>
|
||||||
cdata.set('HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID', 1)
|
cdata.set('HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID', 1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Check for posix timers, monotonic clock and TAI clock
|
# Check for posix timers and monotonic clock
|
||||||
time_prefix = '#include <time.h>\n'
|
time_prefix = '#include <time.h>\n'
|
||||||
if cdata.has('HAVE_UNISTD_H')
|
if cdata.has('HAVE_UNISTD_H')
|
||||||
time_prefix += '#include <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)
|
cdata.set('HAVE_MONOTONIC_CLOCK', 1)
|
||||||
endif
|
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
|
# Check for __uint128_t (gcc) by checking for 128-bit division
|
||||||
uint128_t_src = '''int main() {
|
uint128_t_src = '''int main() {
|
||||||
static __uint128_t v1 = 100;
|
static __uint128_t v1 = 100;
|
||||||
|
|
Loading…
Reference in a new issue