1 --- xen-4.13.0/tools/xenstore/utils.h.orig 2019-12-17 14:23:09.000000000 +0000
2 +++ xen-4.13.0/tools/xenstore/utils.h 2020-01-21 21:13:05.108957447 +0000
4 void barf(const char *fmt, ...) __attribute__((noreturn));
5 void barf_perror(const char *fmt, ...) __attribute__((noreturn));
7 -void (*xprintf)(const char *fmt, ...);
8 +extern void (*xprintf)(const char *fmt, ...);
10 #define eprintf(_fmt, _args...) xprintf("[ERR] %s" _fmt, __FUNCTION__, ##_args)
12 --- xen-4.13.0/tools/xenstore/xenstored_core.h.orig 2020-01-21 21:15:19.243931307 +0000
13 +++ xen-4.13.0/tools/xenstore/xenstored_core.h 2020-01-21 21:38:35.340617819 +0000
15 /* Open a pipe for signal handling */
16 void init_pipe(int reopen_log_pipe[2]);
18 -xengnttab_handle **xgt_handle;
19 +extern xengnttab_handle **xgt_handle;
21 int remember_string(struct hashtable *hash, const char *str);
23 --- xen-4.13.0/tools/libxl/libxlu_pci.c.orig 2019-12-17 14:23:09.000000000 +0000
24 +++ xen-4.13.0/tools/libxl/libxlu_pci.c 2020-01-21 21:56:26.812212916 +0000
26 int xlu_pci_parse_bdf(XLU_Config *cfg, libxl_device_pci *pcidev, const char *str)
28 unsigned state = STATE_DOMAIN;
29 - unsigned dom, bus, dev, func, vslot = 0;
30 + unsigned dom = 0, bus = 0, dev = 0, func = 0, vslot = 0;
31 char *buf2, *tok, *ptr, *end, *optkey = NULL;
33 if ( NULL == (buf2 = ptr = strdup(str)) )
34 --- xen-4.13.0/tools/libxl/libxl_utils.c.orig 2019-12-17 14:23:09.000000000 +0000
35 +++ xen-4.13.0/tools/libxl/libxl_utils.c 2020-01-21 22:34:52.096300774 +0000
38 memset(un, 0, sizeof(struct sockaddr_un));
39 un->sun_family = AF_UNIX;
40 - strncpy(un->sun_path, path, sizeof(un->sun_path));
41 + strncpy(un->sun_path, path, sizeof(un->sun_path)-1);
45 --- xen-4.13.0/tools/debugger/kdd/kdd.h.orig 2019-12-17 14:23:09.000000000 +0000
46 +++ xen-4.13.0/tools/debugger/kdd/kdd.h 2020-01-21 23:35:55.458605582 +0000
52 + uint8_t payload[65535];
56 --- xen-4.13.0/tools/xenpmd/Makefile.orig 2019-12-17 14:23:09.000000000 +0000
57 +++ xen-4.13.0/tools/xenpmd/Makefile 2020-01-22 22:13:16.564873608 +0000
61 CFLAGS += $(CFLAGS_libxenstore)
62 +CFLAGS += -Wno-error=format-truncation
64 LDLIBS += $(LDLIBS_libxenstore)
66 --- xen-4.13.1/tools/firmware/etherboot/Config~ 2020-05-14 14:19:32.000000000 +0200
67 +++ xen-4.13.1/tools/firmware/etherboot/Config 2020-06-07 17:14:49.704183136 +0200
70 CFLAGS += -UCONSOLE_SERIAL
71 CFLAGS += -DCONSOLE_SERIAL=1
73 +CFLAGS += -Wno-error=array-bounds -Wno-error=enum-conversion
74 --- xen-4.13.1/stubdom/Makefile~ 2020-06-07 17:54:17.000000000 +0200
75 +++ xen-4.13.1/stubdom/Makefile 2020-06-07 17:57:37.373200925 +0200
77 patch -d $@ -p1 < vtpm-cmake-Wextra.patch
78 patch -d $@ -p1 < vtpm-implicit-fallthrough.patch
79 patch -d $@ -p1 < vtpm_TPM_ChangeAuthAsymFinish.patch
80 + patch -d $@ -p1 < vtpm-gcc10.patch
82 cd $@/build; CC=${CC} $(CMAKE) .. -DCMAKE_C_FLAGS:STRING="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement"
84 --- xen-4.13.1/stubdom/vtpm-gcc10.patch~ 2020-06-07 17:54:17.000000000 +0200
85 +++ xen-4.13.1/stubdom/vtpm-gcc10.patch 2020-06-07 17:57:37.373200925 +0200
87 +--- tpm_emulator-x86_64/tpm/tpm_emulator_extern.h~ 2011-12-20 19:30:06.000000000 +0100
88 ++++ tpm_emulator-x86_64/tpm/tpm_emulator_extern.h 2020-06-07 17:52:04.278217629 +0200
93 +-void (*tpm_log)(int priority, const char *fmt, ...);
94 ++extern void (*tpm_log)(int priority, const char *fmt, ...);
96 + #if defined(_WIN32) || defined(_WIN64)
97 + #define __BFILE__ ((strrchr(__FILE__, '\\') ? : __FILE__ - 1) + 1)
99 + #define error(fmt, ...) tpm_log(TPM_LOG_ERROR, "%s:%d: Error: " fmt "\n", \
100 + __BFILE__, __LINE__, ## __VA_ARGS__)
101 + /* initialization */
102 +-int (*tpm_extern_init)(void);
103 +-void (*tpm_extern_release)(void);
104 ++extern int (*tpm_extern_init)(void);
105 ++extern void (*tpm_extern_release)(void);
107 + /* memory allocation */
109 +-void* (*tpm_malloc)(size_t size);
110 ++extern void* (*tpm_malloc)(size_t size);
112 +-void (*tpm_free)(/*const*/ void *ptr);
113 ++extern void (*tpm_free)(/*const*/ void *ptr);
115 + /* random numbers */
117 +-void (*tpm_get_extern_random_bytes)(void *buf, size_t nbytes);
118 ++extern void (*tpm_get_extern_random_bytes)(void *buf, size_t nbytes);
120 + /* usec since last call */
122 +-uint64_t (*tpm_get_ticks)(void);
123 ++extern uint64_t (*tpm_get_ticks)(void);
125 + /* file handling */
127 +-int (*tpm_write_to_storage)(uint8_t *data, size_t data_length);
128 +-int (*tpm_read_from_storage)(uint8_t **data, size_t *data_length);
129 ++extern int (*tpm_write_to_storage)(uint8_t *data, size_t data_length);
130 ++extern int (*tpm_read_from_storage)(uint8_t **data, size_t *data_length);
132 + #endif /* _TPM_EMULATOR_EXTERN_H_ */
134 --- xen-4.13.1/stubdom/vtpmmgr/vtpmmgr.h.orig 2020-06-07 18:20:43.261215712 +0200
135 +++ xen-4.13.1/stubdom/vtpmmgr/vtpmmgr.h 2020-06-07 18:20:56.731170041 +0200
137 #define RSA_KEY_SIZE 0x0800
138 #define RSA_CIPHER_SIZE (RSA_KEY_SIZE / 8)
145 struct tpm_hardware_version {
148 --- xen-4.13.1/stubdom/vtpmmgr/vtpmmgr.c~ 2020-05-14 14:19:32.000000000 +0200
149 +++ xen-4.13.1/stubdom/vtpmmgr/vtpmmgr.c 2020-06-07 18:23:14.950766928 +0200
159 struct tpm_hardware_version hardware_version = {
160 .hw_version = TPM1_HARDWARE,