Edit

IABSD.fr/ports/archivers/unrar/patches/patch-rijndael_cpp

Branch :

  • Show log

    Commit

  • Author : naddy
    Date : 2024-05-20 10:15:16
    Hash : 7e12c2ef
    Message : archivers/unrar: update to 7.01

  • archivers/unrar/patches/patch-rijndael_cpp
  • Index: rijndael.cpp
    --- rijndael.cpp.orig
    +++ rijndael.cpp
    @@ -126,6 +126,12 @@ void Rijndael::Init(bool Encrypt,const byte *key,uint 
         // because "hw.optional.arm.FEAT_AES" was missing in OS X 11, but AES
         // still was supported by Neon.
         AES_Neon=RetCode!=0 || Value!=0;
    +  #elif __OpenBSD__
    +    const int ISAR0_MIB[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 };
    +    uint64_t ISAR0;
    +    size_t Size=sizeof(ISAR0);
    +    int RetCode=sysctl(ISAR0_MIB, 2, &ISAR0, &Size, NULL, 0);
    +    AES_Neon=RetCode!=-1 && ID_AA64ISAR0_AES(ISAR0)>=ID_AA64ISAR0_AES_BASE;
       #else
         AES_Neon=(getauxval(AT_HWCAP) & HWCAP_AES)!=0;
       #endif