From: Guus Sliepen Date: Sat, 9 Apr 2016 14:11:00 +0000 (+0200) Subject: Get rid of a warning when compiling tinc using MinGW. X-Git-Tag: release-1.0.27~6 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=979e32750d23fa2ee42a975690df020b8ded8a51;p=tinc Get rid of a warning when compiling tinc using MinGW. Because Windows has the wrong declaration of setsockopt(). --- diff --git a/src/net_packet.c b/src/net_packet.c index 35630c70..5f6d9d50 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -552,14 +552,14 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) { #if defined(SOL_IP) && defined(IP_TOS) case AF_INET: ifdebug(TRAFFIC) logger(LOG_DEBUG, "Setting IPv4 outgoing packet priority to %d", origpriority); - if(setsockopt(listen_socket[n->sock].udp, SOL_IP, IP_TOS, &origpriority, sizeof(origpriority))) /* SO_PRIORITY doesn't seem to work */ + if(setsockopt(listen_socket[n->sock].udp, SOL_IP, IP_TOS, (void *)&origpriority, sizeof(origpriority))) /* SO_PRIORITY doesn't seem to work */ logger(LOG_ERR, "System call `%s' failed: %s", "setsockopt", strerror(errno)); break; #endif #if defined(IPPROTO_IPV6) && defined(IPV6_TCLASS) case AF_INET6: ifdebug(TRAFFIC) logger(LOG_DEBUG, "Setting IPv6 outgoing packet priority to %d", origpriority); - if(setsockopt(listen_socket[n->sock].udp, IPPROTO_IPV6, IPV6_TCLASS, &origpriority, sizeof(origpriority))) + if(setsockopt(listen_socket[n->sock].udp, IPPROTO_IPV6, IPV6_TCLASS, (void *)&origpriority, sizeof(origpriority))) logger(LOG_ERR, "System call `%s' failed: %s", "setsockopt", strerror(errno)); break; #endif