build: Opt-in to Darwin extensions

In particular, this might give us access to `st_mtim.tv_nsec`. We
already opt-in to GNU and QNX extensions on a similar basis.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2022-02-21 16:45:48 +00:00
parent 94f3bb7074
commit 4c12bce1f9

View File

@@ -130,6 +130,10 @@ if host_system == 'qnx'
add_project_arguments('-D_QNX_SOURCE', language: 'c') add_project_arguments('-D_QNX_SOURCE', language: 'c')
endif endif
if host_system == 'darwin'
add_project_arguments('-D_DARWIN_C_SOURCE', language: 'c')
endif
# Disable strict aliasing; # Disable strict aliasing;
# see https://bugzilla.gnome.org/show_bug.cgi?id=791622 # see https://bugzilla.gnome.org/show_bug.cgi?id=791622
if cc.has_argument('-fno-strict-aliasing') if cc.has_argument('-fno-strict-aliasing')