diff options
Diffstat (limited to 'slirp')
-rw-r--r-- | slirp/misc.c | 4 | ||||
-rw-r--r-- | slirp/socket.c | 4 | ||||
-rw-r--r-- | slirp/tcp_subr.c | 8 | ||||
-rw-r--r-- | slirp/udp.c | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/slirp/misc.c b/slirp/misc.c index d4df972..6b9c2c4 100644 --- a/slirp/misc.c +++ b/slirp/misc.c @@ -212,9 +212,9 @@ fork_exec(struct socket *so, const char *ex, int do_pty) } while (so->s < 0 && errno == EINTR); closesocket(s); opt = 1; - setsockopt(so->s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, sizeof(int)); + qemu_setsockopt(so->s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(int)); opt = 1; - setsockopt(so->s, SOL_SOCKET, SO_OOBINLINE, (char *)&opt, sizeof(int)); + qemu_setsockopt(so->s, SOL_SOCKET, SO_OOBINLINE, &opt, sizeof(int)); socket_set_nonblock(so->s); /* Append the telnet options now */ diff --git a/slirp/socket.c b/slirp/socket.c index bb639ae..8e8819c 100644 --- a/slirp/socket.c +++ b/slirp/socket.c @@ -627,7 +627,7 @@ tcp_listen(Slirp *slirp, uint32_t haddr, u_int hport, uint32_t laddr, addr.sin_port = hport; if (((s = qemu_socket(AF_INET,SOCK_STREAM,0)) < 0) || - (setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int)) < 0) || + (qemu_setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(int)) < 0) || (bind(s,(struct sockaddr *)&addr, sizeof(addr)) < 0) || (listen(s,1) < 0)) { int tmperrno = errno; /* Don't clobber the real reason we failed */ @@ -642,7 +642,7 @@ tcp_listen(Slirp *slirp, uint32_t haddr, u_int hport, uint32_t laddr, #endif return NULL; } - setsockopt(s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(int)); + qemu_setsockopt(s, SOL_SOCKET, SO_OOBINLINE, &opt, sizeof(int)); getsockname(s,(struct sockaddr *)&addr,&addrlen); so->so_fport = addr.sin_port; diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index 7b7ad60..84a6bb5 100644 --- a/slirp/tcp_subr.c +++ b/slirp/tcp_subr.c @@ -338,9 +338,9 @@ int tcp_fconnect(struct socket *so) socket_set_nonblock(s); opt = 1; - setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(opt )); + qemu_setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); opt = 1; - setsockopt(s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(opt )); + qemu_setsockopt(s, SOL_SOCKET, SO_OOBINLINE, &opt, sizeof(opt)); addr.sin_family = AF_INET; if ((so->so_faddr.s_addr & slirp->vnetwork_mask.s_addr) == @@ -427,9 +427,9 @@ void tcp_connect(struct socket *inso) } socket_set_nonblock(s); opt = 1; - setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, sizeof(int)); + qemu_setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(int)); opt = 1; - setsockopt(s, SOL_SOCKET, SO_OOBINLINE, (char *)&opt, sizeof(int)); + qemu_setsockopt(s, SOL_SOCKET, SO_OOBINLINE, &opt, sizeof(int)); socket_set_nodelay(s); so->so_fport = addr.sin_port; diff --git a/slirp/udp.c b/slirp/udp.c index 9286cb7..b105f87 100644 --- a/slirp/udp.c +++ b/slirp/udp.c @@ -372,7 +372,7 @@ udp_listen(Slirp *slirp, uint32_t haddr, u_int hport, uint32_t laddr, udp_detach(so); return NULL; } - setsockopt(so->s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int)); + qemu_setsockopt(so->s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(int)); getsockname(so->s,(struct sockaddr *)&addr,&addrlen); so->so_fport = addr.sin_port; |