ssdp_device: exclude IPv6 stuff when there's no IPv6
Add an additional INET_IPV6 exclusion around IPV6_MULTICAST_HOPS since the definition isn't guaranteed to exist when the toolchain lacks IPv6 support. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
This commit is contained in:
parent
a383cbb8e2
commit
1c21e6e54f
@ -210,6 +210,7 @@ static int NewRequestHandler(
|
|||||||
(char *)&ttl, sizeof(int));
|
(char *)&ttl, sizeof(int));
|
||||||
socklen = sizeof(struct sockaddr_in);
|
socklen = sizeof(struct sockaddr_in);
|
||||||
break;
|
break;
|
||||||
|
#ifdef INET_IPV6
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
inet_ntop(AF_INET6,
|
inet_ntop(AF_INET6,
|
||||||
&((struct sockaddr_in6 *)DestAddr)->sin6_addr,
|
&((struct sockaddr_in6 *)DestAddr)->sin6_addr,
|
||||||
@ -219,6 +220,7 @@ static int NewRequestHandler(
|
|||||||
setsockopt(ReplySock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
|
setsockopt(ReplySock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
|
||||||
(char *)&hops, sizeof(hops));
|
(char *)&hops, sizeof(hops));
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Invalid destination address specified.");
|
"Invalid destination address specified.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user