diff options
author | Unit 193 <unit193@ubuntu.com> | 2019-10-30 20:33:41 -0400 |
---|---|---|
committer | Unit 193 <unit193@ubuntu.com> | 2019-10-30 20:33:41 -0400 |
commit | e1baef3747df23adf1eebb58dca012f25f845c7b (patch) | |
tree | efcd9dd34ea2158e49d60e30685ad89cdb42013d | |
parent | b2eec0c63bb2032fd9fa4086dbf875dd0bd3199f (diff) | |
download | veracrypt-e1baef3747df23adf1eebb58dca012f25f845c7b.tar.bz2 veracrypt-e1baef3747df23adf1eebb58dca012f25f845c7b.tar.xz veracrypt-e1baef3747df23adf1eebb58dca012f25f845c7b.tar.zst |
d/p/002-Fix_compilation_on_non-x86_platforms.patch: Grab upstream commit to fix compilation on non-x86 platforms.
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/patches/002-Fix_compilation_on_non-x86_platforms.patch | 54 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 57 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index aab51dd..4209d32 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ veracrypt (1.24-Hotfix1-0vanir1) unstable; urgency=medium * New upstream version 1.24-Hotfix1 - Refresh patches. + * d/p/002-Fix_compilation_on_non-x86_platforms.patch: + - Grab upstream commit to fix compilation on non-x86 platforms. -- Unit 193 <unit193@ubuntu.com> Wed, 30 Oct 2019 19:07:18 -0400 diff --git a/debian/patches/002-Fix_compilation_on_non-x86_platforms.patch b/debian/patches/002-Fix_compilation_on_non-x86_platforms.patch new file mode 100644 index 0000000..4404555 --- /dev/null +++ b/debian/patches/002-Fix_compilation_on_non-x86_platforms.patch @@ -0,0 +1,54 @@ +From afe6b2f45b15393026a1159e5f3d165ac7d0b94a Mon Sep 17 00:00:00 2001 +From: Mounir IDRASSI <mounir.idrassi@idrix.fr> +Date: Mon, 28 Oct 2019 23:16:15 +0100 +Subject: [PATCH] Linux: Fix compilation error on non-x86 platform by providing + generic implementation for jent_get_nstime function + +--- + src/Crypto/jitterentropy-base-user.h | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/src/Crypto/jitterentropy-base-user.h b/src/Crypto/jitterentropy-base-user.h +index 0ebbac5d6..3502dd4f2 100644 +--- a/src/Crypto/jitterentropy-base-user.h ++++ b/src/Crypto/jitterentropy-base-user.h +@@ -75,6 +75,8 @@ static VC_INLINE void jent_get_nstime(uint64 *out) + + #else + ++#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64 ++ + /* taken from Linux kernel */ + #if CRYPTOPP_BOOL_X64 + #define DECLARE_ARGS(val, low, high) unsigned low, high +@@ -93,6 +95,29 @@ VC_INLINE void jent_get_nstime(uint64 *out) + *out = EAX_EDX_VAL(val, low, high); + } + ++#else ++ ++#include <time.h> ++ ++VC_INLINE void jent_get_nstime(uint64 *out) ++{ ++ /* we could use CLOCK_MONOTONIC(_RAW), but with CLOCK_REALTIME ++ * we get some nice extra entropy once in a while from the NTP actions ++ * that we want to use as well... though, we do not rely on that ++ * extra little entropy */ ++ uint64_t tmp = 0; ++ struct timespec time; ++ if (clock_gettime(CLOCK_REALTIME, &time) == 0) ++ { ++ tmp = time.tv_sec; ++ tmp = tmp << 32; ++ tmp = tmp | time.tv_nsec; ++ } ++ *out = tmp; ++} ++ ++#endif ++ + #endif + + #ifdef _MSC_VER + diff --git a/debian/patches/series b/debian/patches/series index f62fa66..922f4db 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 001-indicator-support.patch +002-Fix_compilation_on_non-x86_platforms.patch |