From: Jordan Williams Date: Mon, 22 Apr 2024 20:03:50 +0000 (-0500) Subject: meson: Define _DARWIN_C_SOURCE on macOS as is done in Autotools X-Git-Tag: v2.40.1-rc1~9^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5981b20e242efe916e5f3a3e7303725d2157a38;p=thirdparty%2Futil-linux.git meson: Define _DARWIN_C_SOURCE on macOS as is done in Autotools Signed-off-by: Jordan Williams (cherry picked from commit df277231cf9f4dcb98dd16dc77ff5c9d4d0b1452) --- diff --git a/meson.build b/meson.build index 7c4fac1e7..0af96127d 100644 --- a/meson.build +++ b/meson.build @@ -41,6 +41,10 @@ vendordir = get_option('vendordir') add_project_arguments('-D_GNU_SOURCE', language : 'c') +if host_machine.system() == 'darwin' + add_project_arguments('-D_DARWIN_C_SOURCE', language : 'c') +endif + cc = meson.get_compiler('c') conf = configuration_data()