multimedia/librespot: fix build on powerpc64le

/wrkdirs/usr/ports/multimedia/librespot/work/librespot-0.6.0/cargo-crates/aws-lc-sys-0.22.0/aws-lc/crypto/fipsmodule/cpucap/cpu_ppc64le.c:72:28: error: call to undeclared function 'getauxval'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
     72 |   OPENSSL_ppc64le_hwcap2 = getauxval(AT_HWCAP2);
        |                            ^
  1 error generated.
This commit is contained in:
Piotr Kubaj 2024-12-11 11:27:02 +01:00
parent 9df694a48d
commit a171f90054

View file

@ -0,0 +1,14 @@
--- cargo-crates/aws-lc-sys-0.22.0/aws-lc/crypto/fipsmodule/cpucap/cpu_ppc64le.c.orig 2006-07-24 01:21:28 UTC
+++ cargo-crates/aws-lc-sys-0.22.0/aws-lc/crypto/fipsmodule/cpucap/cpu_ppc64le.c
@@ -69,7 +69,11 @@ void OPENSSL_cpuid_setup(void) {
void OPENSSL_cpuid_setup(void) {
#if defined(AT_HWCAP2)
+# if defined(__linux__)
OPENSSL_ppc64le_hwcap2 = getauxval(AT_HWCAP2);
+#elif defined(__FreeBSD__)
+ elf_aux_info(AT_HWCAP2, &OPENSSL_ppc64le_hwcap2, sizeof(OPENSSL_ppc64le_hwcap2));
+#endif
#else
OPENSSL_ppc64le_hwcap2 = 0;
#endif