From 55c959247b6b9a7863f5df1e9a229bf65a8f5723 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Mon, 6 Oct 2014 14:44:23 +0200 Subject: [PATCH] miniupnpd/minissdp.c: remove warning if ipv6 is disabled --- miniupnpd/minissdp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/miniupnpd/minissdp.c b/miniupnpd/minissdp.c index 2775a7f..8444050 100644 --- a/miniupnpd/minissdp.c +++ b/miniupnpd/minissdp.c @@ -1,4 +1,4 @@ -/* $Id: minissdp.c,v 1.66 2014/04/20 16:34:26 nanard Exp $ */ +/* $Id: minissdp.c,v 1.69 2014/09/06 08:17:01 nanard Exp $ */ /* MiniUPnP project * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * (c) 2006-2014 Thomas Bernard @@ -26,6 +26,7 @@ #include "getroute.h" #include "asyncsendto.h" #include "codelength.h" +#include "macros.h" /* SSDP ip/port */ #define SSDP_PORT (1900) @@ -579,6 +580,9 @@ SendSSDPNotifies(int s, const char * host, unsigned short http_port, const char * dest_str; int i=0; char ver_str[4]; +#ifndef ENABLE_IPV6 + UNUSED(ipv6); +#endif memset(&sockname, 0, sizeof(sockname)); #ifdef ENABLE_IPV6 @@ -1113,11 +1117,11 @@ SendSSDPGoodbye(int * sockets, int n_sockets) struct sockaddr_in6 sockname6; struct sockaddr * sockname; socklen_t socknamelen; + int ipv6 = 0; #endif int i, j; char ver_str[4]; int ret = 0; - int ipv6 = 0; const char * dest_str; memset(&sockname4, 0, sizeof(struct sockaddr_in));