minissdpd.c: minor fixes when IPv6 is disabled at compile time

This commit is contained in:
Thomas Bernard 2014-11-06 11:16:20 +01:00
parent 7ec7cec59e
commit ecb382533c
1 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $Id: minissdpd.c,v 1.37 2014/02/28 18:39:11 nanard Exp $ */
/* $Id: minissdpd.c,v 1.39 2014/11/06 10:13:06 nanard Exp $ */
/* MiniUPnP project
* (c) 2007-2014 Thomas Bernard
* website : http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
@ -876,7 +876,9 @@ int main(int argc, char * * argv)
const char * sockpath = "/var/run/minissdpd.sock";
const char * pidfilename = "/var/run/minissdpd.pid";
int debug_flag = 0;
#ifdef ENABLE_IPV6
int ipv6 = 0;
#endif /* ENABLE_IPV6 */
int deltadev = 0;
struct sockaddr_in sendername;
socklen_t sendername_len;
@ -910,7 +912,11 @@ int main(int argc, char * * argv)
if(n_if_addr < 1)
{
fprintf(stderr,
"Usage: %s [-d] [-6] [-s socket] [-p pidfile] "
"Usage: %s [-d] "
#ifdef ENABLE_IPV6
"[-6] "
#endif
"[-s socket] [-p pidfile] "
"-i <interface> [-i <interface2>] ...\n",
argv[0]);
fprintf(stderr,