mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-04-24 13:50:40 +02:00
Check for more symbols before defining HAVE_CLOCK_MONOTONIC in Meson
MacOS has limited support for monotonic clock in its pthread implementation. When building with Meson, `HAVE_MONOTONIC_CLOCK` is defined despite this. This PR checks for the existence of the missing function `pthread_condattr_setclock`. To match parity with AutoTools, it also checks for `clock_getres`. Fixes #419.
This commit is contained in:
parent
71cac05ffb
commit
b20b379e50
1 changed files with 3 additions and 1 deletions
|
|
@ -328,7 +328,9 @@ data_config.set('top_builddir', meson.project_build_root())
|
|||
threads = dependency('threads')
|
||||
config.set(
|
||||
'HAVE_MONOTONIC_CLOCK',
|
||||
cc.has_header_symbol('pthread.h', 'CLOCK_MONOTONIC', args: compile_args_c),
|
||||
cc.has_header_symbol('pthread.h', 'CLOCK_MONOTONIC', args: compile_args_c)
|
||||
and cc.has_header_symbol('pthread.h', 'pthread_condattr_setclock', args: compile_args_c)
|
||||
and cc.has_header_symbol('time.h', 'clock_getres', args: compile_args_c),
|
||||
)
|
||||
|
||||
glib = dependency(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue