libupnp-1.6.17-no-ipv6.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 812bdabc2c293173ea943059a577d480884a6cc1 Mon Sep 17 00:00:00 2001
  2. From: Gustavo Zacarias <gustavo@zacarias.com.ar>
  3. Date: Wed, 11 Apr 2012 11:17:45 -0300
  4. Subject: [PATCH] ssdp_device: exclude IPv6 stuff when there's no IPv6
  5. Add an additional INET_IPV6 exclusion around IPV6_MULTICAST_HOPS since
  6. the definition isn't guaranteed to exist when the toolchain lacks IPv6
  7. support.
  8. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  9. ---
  10. upnp/src/ssdp/ssdp_device.c | 2 ++
  11. 1 files changed, 2 insertions(+), 0 deletions(-)
  12. diff --git a/upnp/src/ssdp/ssdp_device.c b/upnp/src/ssdp/ssdp_device.c
  13. index d3517cc..a439005 100644
  14. --- a/upnp/src/ssdp/ssdp_device.c
  15. +++ b/upnp/src/ssdp/ssdp_device.c
  16. @@ -210,6 +210,7 @@ static int NewRequestHandler(
  17. (char *)&ttl, sizeof(int));
  18. socklen = sizeof(struct sockaddr_in);
  19. break;
  20. +#ifdef INET_IPV6
  21. case AF_INET6:
  22. inet_ntop(AF_INET6,
  23. &((struct sockaddr_in6 *)DestAddr)->sin6_addr,
  24. @@ -219,6 +220,7 @@ static int NewRequestHandler(
  25. setsockopt(ReplySock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
  26. (char *)&hops, sizeof(hops));
  27. break;
  28. +#endif
  29. default:
  30. UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
  31. "Invalid destination address specified.");
  32. --
  33. 1.7.3.4