aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended/qat/files/qat16-Osal-fix-build-with-x32.patch
blob: 2f794cec9e4132c60149fe93530e50b4eb34a772 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 8da85286efc86b4f5bbf14f755c84d1982841973 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Wed, 3 Jan 2018 15:45:59 +0800
Subject: [PATCH] Osal: fix build with x32

x32 follows ILP32 model and has __x86_64__ defined too. Make sure
that we check for ILP32 also before using architecture dependent
types.

Upstream-Status: Accepted [Code released in tarball form only]

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 quickassist/adf/platform/include/adf_platform_common.h | 2 +-
 quickassist/utilities/osal/include/OsalTypes.h         | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/quickassist/adf/platform/include/adf_platform_common.h b/quickassist/adf/platform/include/adf_platform_common.h
index 8673ec1..de5c31a 100755
--- a/quickassist/adf/platform/include/adf_platform_common.h
+++ b/quickassist/adf/platform/include/adf_platform_common.h
@@ -207,7 +207,7 @@
  *     xx refers to arch, i.e.64bit or 32bit
  *     yy refers to number of bytes copied from src to dst, i.e. 64 or 128 bytes
  */
-#ifdef __x86_64__
+#if (defined (__x86_64__) && !defined (__ILP32__))
 #define adf_memcpy64_64(dst, src)\
 do {                              \
     __asm__ __volatile__ (        \
diff --git a/quickassist/utilities/osal/include/OsalTypes.h b/quickassist/utilities/osal/include/OsalTypes.h
index d8fa1d9..eaf08bf 100755
--- a/quickassist/utilities/osal/include/OsalTypes.h
+++ b/quickassist/utilities/osal/include/OsalTypes.h
@@ -160,13 +160,13 @@ typedef volatile INT32 VINT32;
  */
 #define OSAL_HUNDRED (100)
 
-#ifdef __x86_64__
+#if (defined (__x86_64__) && !defined (__ILP32__))
 #define ARCH_INT	INT64
 #else
 #define ARCH_INT	INT32
 #endif
 
-#ifdef __x86_64__
+#if (defined (__x86_64__) && !defined (__ILP32__))
 #define	UARCH_INT	UINT64
 #else
 #define	UARCH_INT	UINT32
-- 
2.7.4