summary refs log tree commit diff stats
path: root/net/tap-solaris.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tap-solaris.c')
-rw-r--r--net/tap-solaris.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/tap-solaris.c b/net/tap-solaris.c
index 51b7830bef..af2ebb16f5 100644
--- a/net/tap-solaris.c
+++ b/net/tap-solaris.c
@@ -198,7 +198,12 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
             return -1;
         }
     }
-    g_unix_set_fd_nonblocking(fd, true, NULL);
+
+    if (!qemu_set_blocking(fd, false, errp)) {
+        close(fd);
+        return -1;
+    }
+
     return fd;
 }