Fix FTBS on undefined clock_gettime() and asprintf()

Some platforms (eg. SunOS) explicitly need extra symbols in order to define
those functions. There're many files needing the __EXTENSIONS__ symbol,
so doing this on a global scale.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-06-21 18:51:53 +02:00
parent ad78bb591d
commit b065dbc5cc

View file

@ -46,6 +46,12 @@ cc = meson.get_compiler('c')
android = cc.compiles('''int func() { return __ANDROID__; }''')
# Solaris / Illumos
if host_machine.system() == 'sunos'
add_global_arguments('-D__EXTENSIONS__', language : 'c')
add_global_arguments('-D_POSIX_C_SOURCE=3', language : 'c')
endif
symbols_check = find_program('symbols-check.py')
prog_nm = find_program('nm')