Configuring QEMU with: configure --target-list="x86_64-softmmu" --cc=clang --enable-pvrdma Results in: qemu/hw/rdma/rdma_rm_defs.h:108:3: error: redefinition of typedef 'RdmaDeviceResources' is a C11 feature [-Werror,-Wtypedef-redefinition] } RdmaDeviceResources; ^ qemu/hw/rdma/rdma_backend_defs.h:24:36: note: previous definition is here typedef struct RdmaDeviceResources RdmaDeviceResources;
Fix by removing one of the 'typedef' definitions. Signed-off-by: Marcel Apfelbaum <marcel.apfelb...@gmail.com> Message-Id: <20190214154053.15050-1-marcel.apfelb...@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com> Acked-by: Kamal Heib <kamalhe...@gmail.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelb...@gmail.com> --- hw/rdma/rdma_rm_defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/rdma/rdma_rm_defs.h b/hw/rdma/rdma_rm_defs.h index 325bbf58ec..e00091e730 100644 --- a/hw/rdma/rdma_rm_defs.h +++ b/hw/rdma/rdma_rm_defs.h @@ -120,7 +120,7 @@ typedef struct RdmaRmStats { uint64_t missing_cqe; } RdmaRmStats; -typedef struct RdmaDeviceResources { +struct RdmaDeviceResources { RdmaRmPort port; RdmaRmResTbl pd_tbl; RdmaRmResTbl mr_tbl; @@ -131,6 +131,6 @@ typedef struct RdmaDeviceResources { GHashTable *qp_hash; /* Keeps mapping between real and emulated */ QemuMutex lock; RdmaRmStats stats; -} RdmaDeviceResources; +}; #endif -- 2.17.1