1ld: /home/abuild/rpmbuild/BUILD/xen-4.8.20191211T160002.8db85532cb/non-dbg/stubdom/vtpm/vtpm.a(vtpm_cmd.o):(.bss+0x28): multiple definition of `tpm_malloc'; /home/abuild/rpmbuild/BUILD/xen-4.8.20191211T160002.8db85532cb/non-dbg/stubdom/vtpm/vtpm.a(vtpm.o):(.bss+0x728): first defined here 2--- a/tpm/tpm_emulator_extern.h 3+++ b/tpm/tpm_emulator_extern.h 4@@ -29,7 +29,7 @@ enum { 5 TPM_LOG_ERROR 6 }; 7 8-void (*tpm_log)(int priority, const char *fmt, ...); 9+extern void (*tpm_log)(int priority, const char *fmt, ...); 10 11 #if defined(_WIN32) || defined(_WIN64) 12 #define __BFILE__ ((strrchr(__FILE__, '\\') ? : __FILE__ - 1) + 1) 13@@ -44,27 +44,27 @@ void (*tpm_log)(int priority, const char 14 #define error(fmt, ...) tpm_log(TPM_LOG_ERROR, "%s:%d: Error: " fmt "\n", \ 15 __BFILE__, __LINE__, ## __VA_ARGS__) 16 /* initialization */ 17-int (*tpm_extern_init)(void); 18-void (*tpm_extern_release)(void); 19+extern int (*tpm_extern_init)(void); 20+extern void (*tpm_extern_release)(void); 21 22 /* memory allocation */ 23 24-void* (*tpm_malloc)(size_t size); 25+extern void* (*tpm_malloc)(size_t size); 26 27-void (*tpm_free)(/*const*/ void *ptr); 28+extern void (*tpm_free)(/*const*/ void *ptr); 29 30 /* random numbers */ 31 32-void (*tpm_get_extern_random_bytes)(void *buf, size_t nbytes); 33+extern void (*tpm_get_extern_random_bytes)(void *buf, size_t nbytes); 34 35 /* usec since last call */ 36 37-uint64_t (*tpm_get_ticks)(void); 38+extern uint64_t (*tpm_get_ticks)(void); 39 40 /* file handling */ 41 42-int (*tpm_write_to_storage)(uint8_t *data, size_t data_length); 43-int (*tpm_read_from_storage)(uint8_t **data, size_t *data_length); 44+extern int (*tpm_write_to_storage)(uint8_t *data, size_t data_length); 45+extern int (*tpm_read_from_storage)(uint8_t **data, size_t *data_length); 46 47 #endif /* _TPM_EMULATOR_EXTERN_H_ */ 48 49