From 237197ee69249e4bb27a6800526f775ebf722366 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Fri, 25 Feb 2022 23:17:32 +1100 Subject: [PATCH] util: unbreak non-linux mips64 build Put linux specific path inside an ifdef. Unbreaks mips64 build on OpenBSD and likely other systems without Elf64_auxv_t. Fixes: 88b234d7a7c ("gallivm: add basic mips64 support and set mcpu to mips64r5 on ls3a4000") Reviewed-by: Ilia Mirkin Part-of: (cherry picked from commit 7d609431d4f69903648f6bbb5b3bfc87b807ab17) --- .pick_status.json | 2 +- src/util/u_cpu_detect.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index cbd8fd27221..fd91eb8d518 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4000,7 +4000,7 @@ "description": "util: unbreak non-linux mips64 build", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "88b234d7a7cd71fcb4955428010f238ec9530431" }, diff --git a/src/util/u_cpu_detect.c b/src/util/u_cpu_detect.c index 955d087b8ea..0b329f1b293 100644 --- a/src/util/u_cpu_detect.c +++ b/src/util/u_cpu_detect.c @@ -438,6 +438,7 @@ check_os_arm_support(void) static void check_os_mips64_support(void) { +#if defined(PIPE_OS_LINUX) Elf64_auxv_t aux; int fd; @@ -453,6 +454,7 @@ check_os_mips64_support(void) } close (fd); } +#endif /* PIPE_OS_LINUX */ } #endif /* PIPE_ARCH_MIPS64 */