From 836a3dc02c72f917db5be386b9b4787a59d48610 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <dev@jonasschnelli.ch>
Date: Mon, 7 Dec 2020 22:16:06 +0100
Subject: [PATCH] Avoid weak-linked getauxval support on non-linux platforms
 (like macOS)

---
 configure.ac | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure.ac b/configure.ac
index 682e0e8c6eb..723e290cc17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1116,8 +1116,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 
 AC_MSG_CHECKING(for weak getauxval support in the compiler)
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+    #ifdef __linux__
     unsigned long getauxval(unsigned long type) __attribute__((weak));
     #define AT_HWCAP 16
+    #endif
   ]], [[
     getauxval(AT_HWCAP);
   ]])],