]> git.proxmox.com Git - qemu.git/blobdiff - slirp/misc.c
rng-egd: remove redundant free
[qemu.git] / slirp / misc.c
index 6b9c2c405b6a4ff4bfc8565032f5b9c4f9484cdb..6c1636f7b6d6acf424cd3e6070f00499c42d408a 100644 (file)
@@ -9,6 +9,7 @@
 #include <libslirp.h>
 
 #include "monitor/monitor.h"
+#include "qemu/main-loop.h"
 
 #ifdef DEBUG
 int slirp_debug = DBG_CALL|DBG_MISC|DBG_ERROR;
@@ -211,11 +212,10 @@ fork_exec(struct socket *so, const char *ex, int do_pty)
                     so->s = accept(s, (struct sockaddr *)&addr, &addrlen);
                 } while (so->s < 0 && errno == EINTR);
                 closesocket(s);
-                opt = 1;
-                qemu_setsockopt(so->s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(int));
+                socket_set_fast_reuse(so->s);
                 opt = 1;
                 qemu_setsockopt(so->s, SOL_SOCKET, SO_OOBINLINE, &opt, sizeof(int));
-               socket_set_nonblock(so->s);
+               qemu_set_nonblock(so->s);
 
                /* Append the telnet options now */
                 if (so->so_m != NULL && do_pty == 1)  {
@@ -242,8 +242,6 @@ strdup(str)
 }
 #endif
 
-#include "monitor/monitor.h"
-
 void lprint(const char *format, ...)
 {
     va_list args;