]> git.pld-linux.org Git - packages/xen.git/blob - gcc10.patch
- more gcc10 patch updates
[packages/xen.git] / gcc10.patch
1 --- xen-4.13.1/tools/firmware/etherboot/Config~ 2020-05-14 14:19:32.000000000 +0200
2 +++ xen-4.13.1/tools/firmware/etherboot/Config  2020-06-07 17:14:49.704183136 +0200
3 @@ -7,3 +7,5 @@
4  
5  CFLAGS += -UCONSOLE_SERIAL
6  CFLAGS += -DCONSOLE_SERIAL=1
7 +
8 +CFLAGS += -Wno-error=enum-conversion -Wno-error=maybe-uninitialized
9 --- xen-4.13.1/stubdom/Makefile~        2020-06-07 17:54:17.000000000 +0200
10 +++ xen-4.13.1/stubdom/Makefile 2020-06-07 17:57:37.373200925 +0200
11 @@ -232,6 +232,7 @@
12         patch -d $@ -p1 < vtpm-cmake-Wextra.patch
13         patch -d $@ -p1 < vtpm-implicit-fallthrough.patch
14         patch -d $@ -p1 < vtpm_TPM_ChangeAuthAsymFinish.patch
15 +       patch -d $@ -p1 < vtpm-gcc10.patch
16         mkdir $@/build
17         cd $@/build; CC=${CC} $(CMAKE) .. -DCMAKE_C_FLAGS:STRING="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement"
18         touch $@
19 --- xen-4.13.1/stubdom/vtpm-gcc10.patch~        2020-06-07 17:54:17.000000000 +0200
20 +++ xen-4.13.1/stubdom/vtpm-gcc10.patch 2020-06-07 17:57:37.373200925 +0200
21 @@ -0,0 +1,47 @@
22 +--- tpm_emulator-x86_64/tpm/tpm_emulator_extern.h~     2011-12-20 19:30:06.000000000 +0100
23 ++++ tpm_emulator-x86_64/tpm/tpm_emulator_extern.h      2020-06-07 17:52:04.278217629 +0200
24 +@@ -29,7 +29,7 @@
25 +   TPM_LOG_ERROR
26 + };
27
28 +-void (*tpm_log)(int priority, const char *fmt, ...);
29 ++extern void (*tpm_log)(int priority, const char *fmt, ...);
30
31 + #if defined(_WIN32) || defined(_WIN64)
32 + #define __BFILE__ ((strrchr(__FILE__, '\\') ? : __FILE__ - 1) + 1)
33 +@@ -44,27 +44,27 @@
34 + #define error(fmt, ...) tpm_log(TPM_LOG_ERROR, "%s:%d: Error: " fmt "\n", \
35 +                                 __BFILE__, __LINE__, ## __VA_ARGS__)
36 + /* initialization */
37 +-int (*tpm_extern_init)(void);
38 +-void (*tpm_extern_release)(void);
39 ++extern int (*tpm_extern_init)(void);
40 ++extern void (*tpm_extern_release)(void);
41
42 + /* memory allocation */
43
44 +-void* (*tpm_malloc)(size_t size);
45 ++extern void* (*tpm_malloc)(size_t size);
46
47 +-void (*tpm_free)(/*const*/ void *ptr);
48 ++extern void (*tpm_free)(/*const*/ void *ptr);
49
50 + /* random numbers */
51
52 +-void (*tpm_get_extern_random_bytes)(void *buf, size_t nbytes);
53 ++extern void (*tpm_get_extern_random_bytes)(void *buf, size_t nbytes);
54
55 + /* usec since last call */
56
57 +-uint64_t (*tpm_get_ticks)(void);
58 ++extern uint64_t (*tpm_get_ticks)(void);
59
60 + /* file handling */
61
62 +-int (*tpm_write_to_storage)(uint8_t *data, size_t data_length);
63 +-int (*tpm_read_from_storage)(uint8_t **data, size_t *data_length);
64 ++extern int (*tpm_write_to_storage)(uint8_t *data, size_t data_length);
65 ++extern int (*tpm_read_from_storage)(uint8_t **data, size_t *data_length);
66
67 + #endif /* _TPM_EMULATOR_EXTERN_H_ */
68
69 --- xen-4.13.1/stubdom/vtpmmgr/vtpmmgr.h.orig   2020-06-07 18:20:43.261215712 +0200
70 +++ xen-4.13.1/stubdom/vtpmmgr/vtpmmgr.h        2020-06-07 18:20:56.731170041 +0200
71 @@ -50,11 +50,6 @@
72  #define RSA_KEY_SIZE 0x0800
73  #define RSA_CIPHER_SIZE (RSA_KEY_SIZE / 8)
74  
75 -enum {
76 -    TPM1_HARDWARE = 1,
77 -    TPM2_HARDWARE,
78 -} tpm_version;
79 -
80  struct tpm_hardware_version {
81      int hw_version;
82  };
83 --- xen-4.13.1/stubdom/vtpmmgr/vtpmmgr.c~       2020-05-14 14:19:32.000000000 +0200
84 +++ xen-4.13.1/stubdom/vtpmmgr/vtpmmgr.c        2020-06-07 18:23:14.950766928 +0200
85 @@ -45,6 +45,11 @@
86  #include "vtpmmgr.h"
87  #include "tcg.h"
88  
89 +enum {
90 +    TPM1_HARDWARE = 1,
91 +    TPM2_HARDWARE,
92 +} tpm_version;
93 +
94  struct tpm_hardware_version hardware_version = {
95      .hw_version = TPM1_HARDWARE,
96  };
This page took 0.080667 seconds and 3 git commands to generate.