]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration: move port_attr inside CONFIG_LINUX
authorAlex Bennée <alex.bennee@linaro.org>
Mon, 1 Jul 2019 15:06:04 +0000 (16:06 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Thu, 4 Jul 2019 18:23:07 +0000 (19:23 +0100)
Otherwise the FreeBSD compiler complains about an unused variable.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
migration/rdma.c

index 74cb2aa9f916d7264fc4c35b9629c82af694d0da..3036221ee826172eabd11c1d8e42f46325d8228e 100644 (file)
@@ -839,10 +839,9 @@ static void qemu_rdma_dump_gid(const char *who, struct rdma_cm_id *id)
  */
 static int qemu_rdma_broken_ipv6_kernel(struct ibv_context *verbs, Error **errp)
 {
-    struct ibv_port_attr port_attr;
-
     /* This bug only exists in linux, to our knowledge. */
 #ifdef CONFIG_LINUX
+    struct ibv_port_attr port_attr;
 
     /*
      * Verbs are only NULL if management has bound to '[::]'.