VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-10-24 19:20:05 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-10-24 21:07:39 +0200
commit96c90d18c2b0b036a90aa19337424c939391b1ac (patch)
treecdaf72906b8b51cab89cf92bbc31c164eeec909f /src/Crypto
parent6b90e026247de0ef459d999dea40c75e7c1f9569 (diff)
downloadVeraCrypt-96c90d18c2b0b036a90aa19337424c939391b1ac.tar.gz
VeraCrypt-96c90d18c2b0b036a90aa19337424c939391b1ac.zip
Linux/MacOSX: Better approach to avoid that jitterentropy code is optimized by the compiler
Diffstat (limited to 'src/Crypto')
-rw-r--r--src/Crypto/jitterentropy-base.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Crypto/jitterentropy-base.c b/src/Crypto/jitterentropy-base.c
index c05f0c37..50544acb 100644
--- a/src/Crypto/jitterentropy-base.c
+++ b/src/Crypto/jitterentropy-base.c
@@ -57,7 +57,11 @@
#pragma optimize( "", off )
#pragma warning(disable:4242 4244 4334) /* disable warnings on the original code */
#else
-#pragma GCC optimize ("O0")
+#if defined(__clang__)
+ #pragma clang optimize off
+#elif defined (__GNUC__)
+ #pragma GCC optimize ("O0")
+#endif
#endif
#include "jitterentropy.h"