Mesa (main): meson: Define _GNU_SOURCE for android host system

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 22 09:34:11 UTC 2022


Module: Mesa
Branch: main
Commit: ee6a0c675b1701df46ed9fc4eab1a5d48a47dd0f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee6a0c675b1701df46ed9fc4eab1a5d48a47dd0f

Author: Danylo Piliaiev <dpiliaiev at igalia.com>
Date:   Tue Jun 21 21:03:22 2022 +0300

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 <dpiliaiev at igalia.com>
Reviewed-by: Emma Anholt <emma at anholt.net>
Reviewed-by: Hyunjun Ko <zzoon at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17173>

---

 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__'



More information about the mesa-commit mailing list