util: unbreak non-linux mips64 build
authorJonathan Gray <jsg@jsg.id.au>
Fri, 25 Feb 2022 12:17:32 +0000 (23:17 +1100)
committerJonathan Gray <jsg@jsg.id.au>
Fri, 25 Feb 2022 23:47:43 +0000 (10:47 +1100)
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 <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15166>

src/util/u_cpu_detect.c

index 7375fab..636c186 100644 (file)
@@ -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 */