Daniel P. Berrange
2007-Aug-22 21:46 UTC
[Xen-devel] PATCH: Avoid struct members clashing with POSIX apis
The TPM code in tools/ioemu/hw/tpm_tis.c has a struct containing a number of function pointers with names open, close, read, write which are the same as various POSIX apis already #included in the file. POSIX allows these functions to be defined as macros and latest GCC/glibc does indeed define them as macros depending on compiler flags. This causes compile errors when deferencing the struct members. The solution is either to change calls like ctx->open () to be (* ctx->open) (), or simply to rename the struct members. Since this struct was only used inside that one file i simply renamed them. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel