Patchwork [08/12] tpm: reorganize headers and split hardware part

login
register
mail settings
Submitter Laszlo Ersek
Date April 15, 2013, 4:19 p.m.
Message ID <516C28A4.7000800@redhat.com>
Download mbox | patch
Permalink /patch/236643/
State New
Headers show

Comments

Laszlo Ersek - April 15, 2013, 4:19 p.m.
On 04/15/13 15:19, Paolo Bonzini wrote:

> diff --git a/include/backends/tpm.h b/include/backends/tpm.h
> index 9e93cc5..a96b110 100644
> --- a/include/backends/tpm.h
> +++ b/include/backends/tpm.h
> @@ -18,7 +18,7 @@
>  #include "qapi/error.h"
>  #include "qapi-types.h"
>  #include "qemu/option.h"
> -#include "tpm/tpm.h"
> +#include "sysemu/tpm.h"
>  
>  #define TYPE_TPM_BACKEND "tpm-backend"
>  #define TPM_BACKEND(obj) \
> @@ -30,6 +30,7 @@
>  
>  typedef struct TPMBackendClass TPMBackendClass;
>  typedef struct TPMBackend TPMBackend;
> +typedef struct TPMState TPMState;
>  
>  typedef struct TPMDriverOps TPMDriverOps;
>  

This breaks the build for me:

include/sysemu/tpm_backend.h:33: error: redefinition of typedef 'TPMState'
include/sysemu/tpm.h:17: note: previous declaration of 'TPMState' was here

The prev decl. is from 8f0605cc.

"include/sysemu/tpm.h" seems like a "more common" header, so suggesting
to drop the typedef from the backend. Anyway the x86_64 default config
build completes that way.

Thanks,
Laszlo

Patch

diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
index a96b110..4667874 100644
--- a/include/sysemu/tpm_backend.h
+++ b/include/sysemu/tpm_backend.h
@@ -30,7 +30,6 @@ 

 typedef struct TPMBackendClass TPMBackendClass;
 typedef struct TPMBackend TPMBackend;
-typedef struct TPMState TPMState;

 typedef struct TPMDriverOps TPMDriverOps;