From d448713e614c308305ef1bd50fcb1719d45ddf63 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 15 Aug 2021 23:00:31 +0200 Subject: MacOSX: Make AESNI availability linked to compiler target and not compilation host --- src/Volume/Cipher.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Volume/Cipher.cpp') diff --git a/src/Volume/Cipher.cpp b/src/Volume/Cipher.cpp index 40507a2d..02ee6989 100644 --- a/src/Volume/Cipher.cpp +++ b/src/Volume/Cipher.cpp @@ -22,7 +22,6 @@ #ifdef TC_AES_HW_CPU # include "Crypto/Aes_hw_cpu.h" #endif -#include "Crypto/cpu.h" extern "C" int IsAesHwCpuSupported () { @@ -32,7 +31,7 @@ extern "C" int IsAesHwCpuSupported () if (!stateValid) { - state = g_hasAESNI ? true : false; + state = HasAESNI() ? true : false; stateValid = true; } return state && VeraCrypt::Cipher::IsHwSupportEnabled(); @@ -203,7 +202,7 @@ namespace VeraCrypt if (!stateValid) { - state = g_hasAESNI ? true : false; + state = HasAESNI() ? true : false; stateValid = true; } return state && HwSupportEnabled; -- cgit v1.2.3