]> git.proxmox.com Git - qemu.git/blobdiff - util/oslib-posix.c
qdev-properties-system.c: Allow vlan or netdev for -device, not both
[qemu.git] / util / oslib-posix.c
index 253bc3df2e899ccf9e4a7e1cde9c5886b86dd877..e00a44c86f0271ab4c430639996f5a1c7d129747 100644 (file)
@@ -157,6 +157,18 @@ void qemu_set_nonblock(int fd)
     fcntl(fd, F_SETFL, f | O_NONBLOCK);
 }
 
+int socket_set_fast_reuse(int fd)
+{
+    int val = 1, ret;
+
+    ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
+                     (const char *)&val, sizeof(val));
+
+    assert(ret == 0);
+
+    return ret;
+}
+
 void qemu_set_cloexec(int fd)
 {
     int f;