meson: define _GNU_SOURCE on FreeBSD

_mesa_strtod() needs this to use strtod_l(), which behaves correctly
wrt `,` vs `.` decimal separator.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2008
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
Eric Engestrom
2019-10-26 22:43:50 +01:00
committed by Eric Engestrom
parent 1a2246a5e0
commit b4f508ab59

View File

@@ -884,7 +884,7 @@ if cc.compiles('__uint128_t foo(void) { return 0; }',
endif
# TODO: this is very incomplete
if ['linux', 'cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system())
if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd'].contains(host_machine.system())
pre_args += '-D_GNU_SOURCE'
elif host_machine.system() == 'sunos'
pre_args += '-D__EXTENSIONS__'