]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
HWCAP is only available on Linux 173/head
authorKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Fri, 8 Sep 2023 07:08:44 +0000 (10:08 +0300)
committerKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Fri, 8 Sep 2023 07:08:44 +0000 (10:08 +0300)
src/util/arch/arm/cpuid_inline.h

index 1173b42cc4c4a80ad7f81f5fa07aa21b2e5370eb..03faf41c3359e5d0d143966d5d753050b5f96283 100644 (file)
@@ -30,7 +30,9 @@
 #ifndef AARCH64_CPUID_INLINE_H_
 #define AARCH64_CPUID_INLINE_H_
 
+#if defined(__linux__)
 #include <sys/auxv.h>
+#endif
 
 #include "ue2common.h"
 #include "util/arch/common/cpuid_flags.h"
@@ -40,6 +42,7 @@ int check_neon(void) {
     return 1;
 }
 
+#if defined(__linux__)
 static inline
 int check_sve(void) {
     unsigned long hwcap = getauxval(AT_HWCAP);
@@ -57,5 +60,16 @@ int check_sve2(void) {
     }
     return 0;
 }
+#else
+static inline
+int check_sve(void) {
+    return 0;
+}
+
+static inline
+int check_sve2(void) {
+    return 0;
+}
+#endif
 
 #endif // AARCH64_CPUID_INLINE_H_