[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 9/9] vtpm: guard against redefining TPM_VENDOR_COMMAND
From: "Luis R. Rodriguez" <mcgrof@xxxxxxxx> vtpm.c already includes tpm/tpm_marshalling.h, this in turn includes tpm_structures.h which already has defined TPM_VENDOR_COMMAND. Guard against its redefinition to avoid a compilation warning on vtpmc: cc <etc> -I../tpm_emulator-x86_64 -c -o vtpm.o vtpm.c In file included from vtpm.c:36:0: vtpm_manager.h:57:0: warning: "TPM_VENDOR_COMMAND" redefined #define TPM_VENDOR_COMMAND 0x02000000 // TPM Main, part 2, section 17. ^ In file included from ../tpm_emulator-x86_64/tpm/tpm_marshalling.h:21:0, from vtpm.c:31: ../tpm_emulator-x86_64/tpm/tpm_structures.h:526:0: note: this is the location of the previous definition Cc: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxx> --- stubdom/vtpmmgr/vtpm_manager.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stubdom/vtpmmgr/vtpm_manager.h b/stubdom/vtpmmgr/vtpm_manager.h index 2d2109dd63cb..6fdaf6aeb074 100644 --- a/stubdom/vtpmmgr/vtpm_manager.h +++ b/stubdom/vtpmmgr/vtpm_manager.h @@ -54,7 +54,10 @@ //************************ Command Codes **************************** #define VTPM_ORD_BASE 0x0000 +/* Defined in tpm_emulator-x86_64/tpm/tpm_structures.h */ +#ifndef TPM_VENDOR_COMMAND #define TPM_VENDOR_COMMAND 0x02000000 // TPM Main, part 2, section 17. +#endif #define VTPM_PRIV_BASE (VTPM_ORD_BASE | TPM_VENDOR_COMMAND) /* -- 2.6.2 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |