From c6f25642e01f9dd435dfc1ffe7a8d4350f2536c7 Mon Sep 17 00:00:00 2001 From: Marcel Apfelbaum Date: Thu, 14 Feb 2019 17:40:53 +0200 Subject: [PATCH] hw/rdma: another clang compilation fix MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Message-Id: <20190214154053.15050-1-marcel.apfelbaum@gmail.com> Reviewed-by: Philippe Mathieu-Daudé Acked-by: Kamal Heib Signed-off-by: Marcel Apfelbaum (cherry picked from commit 59f911938fbaa6a5eff1146c8a4d74e1c55ecc2b) *drop context dep. on c2dd117b385 Signed-off-by: Michael Roth --- 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 7228151239a..17ee8f28713 100644 --- a/hw/rdma/rdma_rm_defs.h +++ b/hw/rdma/rdma_rm_defs.h @@ -85,7 +85,7 @@ typedef struct RdmaRmPort { enum ibv_port_state state; } RdmaRmPort; -typedef struct RdmaDeviceResources { +struct RdmaDeviceResources { RdmaRmPort ports[MAX_PORTS]; RdmaRmResTbl pd_tbl; RdmaRmResTbl mr_tbl; @@ -94,6 +94,6 @@ typedef struct RdmaDeviceResources { RdmaRmResTbl cq_tbl; RdmaRmResTbl cqe_ctx_tbl; GHashTable *qp_hash; /* Keeps mapping between real and emulated */ -} RdmaDeviceResources; +}; #endif -- 2.39.5