From: Blue Swirl Date: Fri, 17 Dec 2010 21:03:00 +0000 (+0000) Subject: Fix warning on mingw32 X-Git-Tag: TizenStudio_2.0_p2.3~3767 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c0f5f7ef142d41f2180bd767915cc6a7779f35e1;p=sdk%2Femulator%2Fqemu.git Fix warning on mingw32 Avoid this warning like other uses of setsockopt: /src/qemu/net/socket.c: In function 'net_socket_mcast_create': /src/qemu/net/socket.c:210: warning: passing argument 4 of 'setsockopt' from incompatible pointer type Signed-off-by: Blue Swirl --- diff --git a/net/socket.c b/net/socket.c index 916c2a8..3182b37 100644 --- a/net/socket.c +++ b/net/socket.c @@ -207,7 +207,8 @@ static int net_socket_mcast_create(struct sockaddr_in *mcastaddr, struct in_addr /* If a bind address is given, only send packets from that address */ if (localaddr != NULL) { - ret = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, localaddr, sizeof(*localaddr)); + ret = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, + (const char *)localaddr, sizeof(*localaddr)); if (ret < 0) { perror("setsockopt(IP_MULTICAST_IF)"); goto fail;