aboutsummaryrefslogtreecommitdiff
path: root/net/socket.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-12-17 21:03:00 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-12-17 21:03:00 +0000
commit4d22c6c2eef69f20e1f4a398e277d6c8dbc4e5b9 (patch)
tree23e6bbcc33ea55dba99f31fc84d32b4e986efd2f /net/socket.c
parent653af235c8df7516a94762fc81e639fc08e9f6d9 (diff)
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 <blauwirbel@gmail.com>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c
index 916c2a8e10..3182b371a7 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;