Commit 0a656f5f authored by malc's avatar malc

Cast pointer arguments of get/setsockopt, send to void * to keep GCC

from producing a warning about pointer type mismatches with Winsock
Signed-off-by: default avatarmalc <av1474@comtv.ru>
parent 9f8fd694
......@@ -58,7 +58,7 @@ static void tcp_wait_for_connect(void *opaque)
dprintf("connect completed\n");
do {
ret = getsockopt(s->fd, SOL_SOCKET, SO_ERROR, &val, &valsize);
ret = getsockopt(s->fd, SOL_SOCKET, SO_ERROR, (void *) &val, &valsize);
} while (ret == -1 && (s->get_error(s)) == EINTR);
if (ret < 0) {
......
......@@ -169,7 +169,8 @@ int tcp_socket_incoming(const char *address, uint16_t port)
memcpy(&addr.sin_addr.s_addr, &in, sizeof(in));
opt = 1;
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1) {
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
(const void *) &opt, sizeof(opt)) == -1) {
goto error;
}
......
......@@ -468,7 +468,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds)
/* Connected */
so->so_state &= ~SS_ISFCONNECTING;
ret = send(so->s, &ret, 0, 0);
ret = send(so->s, (const void *) &ret, 0, 0);
if (ret < 0) {
/* XXXXX Must fix, zero bytes is a NOP */
if (errno == EAGAIN || errno == EWOULDBLOCK ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment