blob: c8af49af90fffb15e5a932485747089bdc126a10 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--- multiarc/src/formats/7z/C/CpuArch.c.orig 2023-01-14 23:53:02 UTC
+++ multiarc/src/formats/7z/C/CpuArch.c
@@ -422,7 +422,16 @@ BoolInt CPU_IsSupported_AES (void) { return APPLE_CRYP
#ifdef USE_HWCAP
+#ifdef __FreeBSD__
+static unsigned long getauxval(int aux)
+{
+ unsigned long auxval = 0;
+ elf_aux_info(aux, &auxval, sizeof(auxval));
+ return auxval;
+}
+#else
#include <asm/hwcap.h>
+#endif
#define MY_HWCAP_CHECK_FUNC_2(name1, name2) \
BoolInt CPU_IsSupported_ ## name1() { return (getauxval(AT_HWCAP) & (HWCAP_ ## name2)) ? 1 : 0; }
|