]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/rdma: another clang compilation fix
authorMarcel Apfelbaum <marcel.apfelbaum@gmail.com>
Thu, 14 Feb 2019 15:40:53 +0000 (17:40 +0200)
committerMarcel Apfelbaum <marcel.apfelbaum@gmail.com>
Sat, 16 Mar 2019 13:52:44 +0000 (15:52 +0200)
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.apfelbaum@gmail.com>
Message-Id: <20190214154053.15050-1-marcel.apfelbaum@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
hw/rdma/rdma_rm_defs.h

index 4b8d704cfe04bc128ff2a0d83c225193f17ed77b..c200d311de3751e87594a04eede9a6dde012c4eb 100644 (file)
@@ -120,7 +120,7 @@ typedef struct RdmaRmStats {
     uint32_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