From ee6a0c675b1701df46ed9fc4eab1a5d48a47dd0f Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Tue, 21 Jun 2022 21:03:22 +0300 Subject: [PATCH] meson: Define _GNU_SOURCE for android host system Otherwise sched_getaffinity isn't be defined and util_cpu_detect_once fails to compile. Signed-off-by: Danylo Piliaiev Reviewed-by: Emma Anholt Reviewed-by: Hyunjun Ko Part-of: --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 555e6ae32fd..4313d4d2a4f 100644 --- a/meson.build +++ b/meson.build @@ -1098,7 +1098,7 @@ if cc.compiles('__uint128_t foo(void) { return 0; }', endif # TODO: this is very incomplete -if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku'].contains(host_machine.system()) +if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android'].contains(host_machine.system()) pre_args += '-D_GNU_SOURCE' elif host_machine.system() == 'sunos' pre_args += '-D__EXTENSIONS__'