diff options
Diffstat (limited to 'patches/patch-aarch64-crypto-cpu-caps.c.patch')
-rw-r--r-- | patches/patch-aarch64-crypto-cpu-caps.c.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/patches/patch-aarch64-crypto-cpu-caps.c.patch b/patches/patch-aarch64-crypto-cpu-caps.c.patch new file mode 100644 index 0000000..dcfbdc0 --- /dev/null +++ b/patches/patch-aarch64-crypto-cpu-caps.c.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | Disable feature detection until we find a more portable way. | ||
2 | |||
3 | --- crypto/arch/aarch64/crypto_cpu_caps.c.orig Sat Dec 14 13:45:16 2024 | ||
4 | +++ crypto/arch/aarch64/crypto_cpu_caps.c Sat Dec 14 13:54:06 2024 | ||
5 | @@ -16,9 +16,12 @@ | ||
6 | */ | ||
7 | |||
8 | #include <sys/types.h> | ||
9 | + | ||
10 | +#if defined(__OpenBSD__) | ||
11 | #include <sys/sysctl.h> | ||
12 | |||
13 | #include <machine/cpu.h> | ||
14 | +#endif | ||
15 | |||
16 | #include <stddef.h> | ||
17 | #include <stdio.h> | ||
18 | @@ -67,6 +70,7 @@ parse_isar0(uint64_t isar0) | ||
19 | return caps; | ||
20 | } | ||
21 | |||
22 | +#if defined(__OpenBSD__) | ||
23 | static int | ||
24 | read_isar0(uint64_t *isar0) | ||
25 | { | ||
26 | @@ -84,6 +88,13 @@ read_isar0(uint64_t *isar0) | ||
27 | |||
28 | return 1; | ||
29 | } | ||
30 | +#else | ||
31 | +static int | ||
32 | +read_isar0(uint64_t *isar0) | ||
33 | +{ | ||
34 | + return 0; | ||
35 | +} | ||
36 | +#endif | ||
37 | |||
38 | void | ||
39 | crypto_cpu_caps_init(void) | ||