From 9957fc7f1ed731e5228089ead3f350341cdd29c0 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 8 Mar 2013 19:58:32 +0100 Subject: MinGW: Replace setsockopt by qemu_setsocketopt Instead of adding missing type casts which are needed by MinGW for the 4th argument, the patch uses qemu_setsockopt which was invented for this purpose. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- slirp/tcp_subr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'slirp/tcp_subr.c') diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index 7b7ad60aea..84a6bb560b 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; -- cgit v1.2.3