X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=slirp%2Fmisc.c;h=6c1636f7b6d6acf424cd3e6070f00499c42d408a;hb=30c367ed446b6ea53245589a5cf373578ac075d7;hp=6b9c2c405b6a4ff4bfc8565032f5b9c4f9484cdb;hpb=cecd77ae6df060bbe8f0eea6691112097e680a52;p=qemu.git diff --git a/slirp/misc.c b/slirp/misc.c index 6b9c2c405..6c1636f7b 100644 --- a/slirp/misc.c +++ b/slirp/misc.c @@ -9,6 +9,7 @@ #include #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;