Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/net-mgmt/aircrack-ng/files/patch-src_aircrack-util_trampoline__ppc.c
16461 views
1
--- src/aircrack-util/trampoline_ppc.c.orig 2019-07-19 18:16:49 UTC
2
+++ src/aircrack-util/trampoline_ppc.c
3
@@ -19,8 +19,10 @@
4
#if defined(__ppc__) || defined(__PPC__)
5
#ifdef HAS_AUXV
6
#include <sys/auxv.h>
7
+#ifndef __FreeBSD__
8
#include <bits/hwcap.h>
9
#endif
10
+#endif
11
#else
12
#error "The wrong CPU architecture file has been included."
13
#endif
14
@@ -35,7 +37,12 @@ int simd_get_supported_features(void)
15
{
16
int result = 0;
17
#ifdef HAS_AUXV
18
+#ifndef __FreeBSD__
19
long hwcaps = getauxval(AT_HWCAP2);
20
+#else
21
+ u_long hwcaps;
22
+ elf_aux_info(AT_HWCAP2, &hwcaps, sizeof(hwcaps));
23
+#endif
24
25
#if defined(PPC_FEATURE2_ARCH_2_07)
26
if (hwcaps & PPC_FEATURE2_ARCH_2_07)
27
28