diff options
author | Unit 193 <unit193@ubuntu.com> | 2019-10-30 20:34:01 -0400 |
---|---|---|
committer | Unit 193 <unit193@ubuntu.com> | 2019-10-30 20:34:01 -0400 |
commit | 5547a53824a6d81d4433ab378957e46ba66f662c (patch) | |
tree | 92c1bb103aa4bb5c9b945218eca02071426eae32 | |
parent | e1baef3747df23adf1eebb58dca012f25f845c7b (diff) | |
download | veracrypt-5547a53824a6d81d4433ab378957e46ba66f662c.tar.bz2 veracrypt-5547a53824a6d81d4433ab378957e46ba66f662c.tar.xz veracrypt-5547a53824a6d81d4433ab378957e46ba66f662c.tar.zst |
d/p/003-Fix_compilation_error_if_type___u64_already_defined.patch: Fix compilation error if type __u64 is already defined by gcc.debian/1.24-Hotfix1-0vanir1
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/patches/003-Fix_compilation_error_if_type___u64_already_defined.patch | 52 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 55 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 4209d32..4d0a1a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ veracrypt (1.24-Hotfix1-0vanir1) unstable; urgency=medium - Refresh patches. * d/p/002-Fix_compilation_on_non-x86_platforms.patch: - Grab upstream commit to fix compilation on non-x86 platforms. + * d/p/003-Fix_compilation_error_if_type___u64_already_defined.patch: + - Fix compilation error if type __u64 is already defined by gcc. -- Unit 193 <unit193@ubuntu.com> Wed, 30 Oct 2019 19:07:18 -0400 diff --git a/debian/patches/003-Fix_compilation_error_if_type___u64_already_defined.patch b/debian/patches/003-Fix_compilation_error_if_type___u64_already_defined.patch new file mode 100644 index 0000000..ac4f11a --- /dev/null +++ b/debian/patches/003-Fix_compilation_error_if_type___u64_already_defined.patch @@ -0,0 +1,52 @@ +From 3fa636d477119fff6e372074568edb42d038f508 Mon Sep 17 00:00:00 2001 +From: Mounir IDRASSI <mounir.idrassi@idrix.fr> +Date: Mon, 28 Oct 2019 18:57:07 +0100 +Subject: [PATCH] Linux: Fix compilation error if type __u64 is already defined + by gcc + +This is the case with Mageia Cauldron which has gcc 9.2.1 +--- + src/Crypto/jitterentropy-base-user.h | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/src/Crypto/jitterentropy-base-user.h b/src/Crypto/jitterentropy-base-user.h +index 04c193618..0ebbac5d6 100644 +--- a/src/Crypto/jitterentropy-base-user.h ++++ b/src/Crypto/jitterentropy-base-user.h +@@ -49,8 +49,6 @@ + #include <stdlib.h> + #include <string.h> + +-typedef uint64 __u64; +- + #ifdef _MSC_VER + + typedef uint64 uint64_t; +@@ -70,7 +68,7 @@ typedef int32 ssize_t; + #endif + #endif + +-static VC_INLINE void jent_get_nstime(__u64 *out) ++static VC_INLINE void jent_get_nstime(uint64 *out) + { + *out = __rdtsc();; + } +@@ -80,7 +78,7 @@ static VC_INLINE void jent_get_nstime(__u64 *out) + /* taken from Linux kernel */ + #if CRYPTOPP_BOOL_X64 + #define DECLARE_ARGS(val, low, high) unsigned low, high +-#define EAX_EDX_VAL(val, low, high) ((low) | ((__u64)(high) << 32)) ++#define EAX_EDX_VAL(val, low, high) ((low) | ((uint64)(high) << 32)) + #define EAX_EDX_RET(val, low, high) "=a" (low), "=d" (high) + #else + #define DECLARE_ARGS(val, low, high) unsigned long long val +@@ -88,7 +86,7 @@ static VC_INLINE void jent_get_nstime(__u64 *out) + #define EAX_EDX_RET(val, low, high) "=A" (val) + #endif + +-VC_INLINE void jent_get_nstime(__u64 *out) ++VC_INLINE void jent_get_nstime(uint64 *out) + { + DECLARE_ARGS(val, low, high); + asm volatile("rdtsc" : EAX_EDX_RET(val, low, high)); + diff --git a/debian/patches/series b/debian/patches/series index 922f4db..ecee136 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 001-indicator-support.patch 002-Fix_compilation_on_non-x86_platforms.patch +003-Fix_compilation_error_if_type___u64_already_defined.patch |