Edit

kc3-lang/libressl/patches/patch-aarch64-crypto-cpu-caps.c.patch

Branch :

  • Browse

    Commit

  • Author : Theo Buehler
    Date : 2024-12-14 13:57:45
    Hash : af9fe76e
    Message : Regen crypto-cpu-caps.c patches

  • patches/patch-aarch64-crypto-cpu-caps.c.patch
  • Disable feature detection until we find a more portable way.
    
    --- crypto/arch/aarch64/crypto_cpu_caps.c.orig	Sat Dec 14 13:45:16 2024
    +++ crypto/arch/aarch64/crypto_cpu_caps.c	Sat Dec 14 13:54:06 2024
    @@ -16,9 +16,12 @@
      */
     
     #include <sys/types.h>
    +
    +#if defined(__OpenBSD__)
     #include <sys/sysctl.h>
     
     #include <machine/cpu.h>
    +#endif
     
     #include <stddef.h>
     #include <stdio.h>
    @@ -67,6 +70,7 @@ parse_isar0(uint64_t isar0)
     	return caps;
     }
     
    +#if defined(__OpenBSD__)
     static int
     read_isar0(uint64_t *isar0)
     {
    @@ -84,6 +88,13 @@ read_isar0(uint64_t *isar0)
     
     	return 1;
     }
    +#else
    +static int
    +read_isar0(uint64_t *isar0)
    +{
    +	return 0;
    +}
    +#endif
     
     void
     crypto_cpu_caps_init(void)