darwin: Compile with -D_DARWIN_C_SOURCE

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
This commit is contained in:
Jeremy Huddleston Sequoia 2023-01-27 16:26:55 -08:00
parent cb77e41fe7
commit fa50af6379

View file

@ -23,6 +23,10 @@ cc_args = []
if host_machine.system() not in ['freebsd', 'openbsd']
cc_args += ['-D_POSIX_C_SOURCE=200809L']
endif
if host_machine.system() == 'darwin'
# For CMSG_LEN(), which is an RFC 2292 addition and not part of POSIX.1-2008
cc_args += ['-D_DARWIN_C_SOURCE']
endif
add_project_arguments(cc_args, language: 'c')
compiler_flags = [