提交 4d22c6c2 编写于 作者: B Blue Swirl

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: NBlue Swirl <blauwirbel@gmail.com>
上级 653af235
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册