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>
This commit is contained in:
Stefan Weil 2013-03-08 19:58:32 +01:00 committed by Stefan Hajnoczi
parent afed260822
commit 9957fc7f1e
8 changed files with 26 additions and 27 deletions

View file

@ -2887,7 +2887,7 @@ static int gdbserver_open(int port)
/* allow fast reuse */
val = 1;
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *)&val, sizeof(val));
qemu_setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val));
sockaddr.sin_family = AF_INET;
sockaddr.sin_port = htons(port);