diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-10-23 22:30:44 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-10-23 22:46:25 +0200 |
commit | 478066c6076934ef50f9cf922cfe55dd96580d12 (patch) | |
tree | 7acafc304087150dc2faf4746f826ae13ea5115d /src/Crypto | |
parent | 74e14c070fb5bebe5258dde72e879fe7be1e43cf (diff) | |
download | VeraCrypt-478066c6076934ef50f9cf922cfe55dd96580d12.tar.gz VeraCrypt-478066c6076934ef50f9cf922cfe55dd96580d12.zip |
Linux/MacOSX: Add missing JitterEntropy implementation
Diffstat (limited to 'src/Crypto')
-rw-r--r-- | src/Crypto/jitterentropy-base-user.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/Crypto/jitterentropy-base-user.h b/src/Crypto/jitterentropy-base-user.h index cbb2f47e..04c19361 100644 --- a/src/Crypto/jitterentropy-base-user.h +++ b/src/Crypto/jitterentropy-base-user.h @@ -88,7 +88,7 @@ static VC_INLINE void jent_get_nstime(__u64 *out) #define EAX_EDX_RET(val, low, high) "=A" (val) #endif -static VC_INLINE void jent_get_nstime(__u64 *out) +VC_INLINE void jent_get_nstime(__u64 *out) { DECLARE_ARGS(val, low, high); asm volatile("rdtsc" : EAX_EDX_RET(val, low, high)); @@ -97,7 +97,10 @@ static VC_INLINE void jent_get_nstime(__u64 *out) #endif -static VC_INLINE void *jent_zalloc(size_t len) +#ifdef _MSC_VER +static +#endif +VC_INLINE void *jent_zalloc(size_t len) { void *tmp = NULL; tmp = TCalloc(len); @@ -111,7 +114,10 @@ static VC_INLINE void *jent_zalloc(size_t len) return tmp; } -static VC_INLINE void jent_zfree(void *ptr, unsigned int len) +#ifdef _MSC_VER +static +#endif +VC_INLINE void jent_zfree(void *ptr, unsigned int len) { if (len % 8) burn(ptr, len); @@ -123,7 +129,10 @@ static VC_INLINE void jent_zfree(void *ptr, unsigned int len) TCfree(ptr); } -static VC_INLINE int jent_fips_enabled(void) +#ifdef _MSC_VER +static +#endif +VC_INLINE int jent_fips_enabled(void) { return 0; } |