aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended/xvisor/files/0001-EMULATORS-Allow-Xvisor-to-compile-with-gcc-10.patch
blob: 221a314c2e03b99fc656faf3d826f1cc92e5a2ab (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
54
55
From 417184cc41cfd33ae7b4c11c8396e0f47f43e2ba Mon Sep 17 00:00:00 2001
From: Jean-Christophe Dubois <jcd@tribudubois.net>
Date: Fri, 8 May 2020 15:17:36 +0200
Subject: [PATCH] EMULATORS: Allow Xvisor to compile with gcc 10.

With gcc 10 because some header files do not declare some variable
definition as extern, the variable get duplicated in all files
using it.

This patch allow xvisor to compile with the latest gcc.

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Reviewed-by: Anup Patel <anup@brainfault.org>
---
 drivers/mmc/core/core.h    |  2 +-
 emulators/display/drawfn.h | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h
index d75d135a..e2ca3141 100644
--- a/drivers/mmc/core/core.h
+++ b/drivers/mmc/core/core.h
@@ -64,7 +64,7 @@ int mmc_go_idle(struct mmc_host *host);
  * Note: Must be called with host->lock held.
  */
 extern struct vmm_bus sdio_bus_type;
-struct vmm_device_type sdio_func_type;
+extern struct vmm_device_type sdio_func_type;
 
 int __sdio_attach(struct mmc_host *host);
 
diff --git a/emulators/display/drawfn.h b/emulators/display/drawfn.h
index f9163cff..385deaf6 100644
--- a/emulators/display/drawfn.h
+++ b/emulators/display/drawfn.h
@@ -69,14 +69,14 @@ typedef void (*drawfn)(struct vmm_surface *,
 				 DRAWFN_ORDER_MAX * \
 				 DRAWFN_FORMAT_MAX)
 
-drawfn drawfn_surface_fntable_8[DRAWFN_FNTABLE_SIZE];
+extern drawfn drawfn_surface_fntable_8[DRAWFN_FNTABLE_SIZE];
 
-drawfn drawfn_surface_fntable_15[DRAWFN_FNTABLE_SIZE];
+extern drawfn drawfn_surface_fntable_15[DRAWFN_FNTABLE_SIZE];
 
-drawfn drawfn_surface_fntable_16[DRAWFN_FNTABLE_SIZE];
+extern drawfn drawfn_surface_fntable_16[DRAWFN_FNTABLE_SIZE];
 
-drawfn drawfn_surface_fntable_24[DRAWFN_FNTABLE_SIZE];
+extern drawfn drawfn_surface_fntable_24[DRAWFN_FNTABLE_SIZE];
 
-drawfn drawfn_surface_fntable_32[DRAWFN_FNTABLE_SIZE];
+extern drawfn drawfn_surface_fntable_32[DRAWFN_FNTABLE_SIZE];
 
 #endif