summaryrefslogtreecommitdiff
path: root/slirp/tcp_subr.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-03-08 19:58:32 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-03-22 13:14:48 +0100
commit9957fc7f1ed731e5228089ead3f350341cdd29c0 (patch)
tree874a4ac706c39aa05f66d285e3d3db20bf83e3f3 /slirp/tcp_subr.c
parentafed26082219b49443193b4ac32d113bbcf967fd (diff)
downloadqemu-9957fc7f1ed731e5228089ead3f350341cdd29c0.tar.gz
qemu-9957fc7f1ed731e5228089ead3f350341cdd29c0.tar.bz2
qemu-9957fc7f1ed731e5228089ead3f350341cdd29c0.zip
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 <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'slirp/tcp_subr.c')
-rw-r--r--slirp/tcp_subr.c8
1 files changed, 4 insertions, 4 deletions
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;