aboutsummaryrefslogtreecommitdiff
path: root/multimedia/aom/files/patch-aom__ports_riscv__cpudetect.c
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/aom/files/patch-aom__ports_riscv__cpudetect.c')
-rw-r--r--multimedia/aom/files/patch-aom__ports_riscv__cpudetect.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/multimedia/aom/files/patch-aom__ports_riscv__cpudetect.c b/multimedia/aom/files/patch-aom__ports_riscv__cpudetect.c
new file mode 100644
index 000000000000..620b4948ebf7
--- /dev/null
+++ b/multimedia/aom/files/patch-aom__ports_riscv__cpudetect.c
@@ -0,0 +1,25 @@
+- Implement runtime detection on FreeBSD
+
+--- aom_ports/riscv_cpudetect.c.orig 2025-09-05 22:10:37 UTC
++++ aom_ports/riscv_cpudetect.c
+@@ -23,6 +23,20 @@
+
+ #define HWCAP_RVV (1 << ('v' - 'a'))
+
++#if defined(__FreeBSD__)
++static unsigned long getauxval(unsigned long type)
++{
++ /* Only AT_HWCAP* return unsigned long */
++ if (type != AT_HWCAP && type != AT_HWCAP2) {
++ return 0;
++ }
++
++ unsigned long ret = 0;
++ elf_aux_info(type, &ret, sizeof(ret));
++ return ret;
++}
++#endif
++
+ int riscv_simd_caps(void) {
+ int flags = 0;
+ #if HAVE_RVV