summaryrefslogtreecommitdiffstats
path: root/veracrypt/build
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2019-12-07 19:30:51 +0000
committer Eric Hameleers <alien@slackware.com>2019-12-07 19:30:51 +0000
commit4d03577a4c1dc8583e487fe5dbf3f0f09b8d09b8 (patch)
tree45e52605ae164b14dc1c37c5d45766f62583476e /veracrypt/build
parent5afd07bb971d94cb90d63fbf36040dc4fcab5975 (diff)
downloadasb-4d03577a4c1dc8583e487fe5dbf3f0f09b8d09b8.tar.gz
asb-4d03577a4c1dc8583e487fe5dbf3f0f09b8d09b8.tar.xz
Initial revision
Diffstat (limited to 'veracrypt/build')
-rw-r--r--veracrypt/build/patches/veracrypt_fix_u64_gcc.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/veracrypt/build/patches/veracrypt_fix_u64_gcc.patch b/veracrypt/build/patches/veracrypt_fix_u64_gcc.patch
new file mode 100644
index 00000000..ac4f11af
--- /dev/null
+++ b/veracrypt/build/patches/veracrypt_fix_u64_gcc.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));
+