--- embedaddon/miniupnpd/testgetifaddr.c 2012/05/29 12:55:57 1.1.1.2 +++ embedaddon/miniupnpd/testgetifaddr.c 2013/07/22 00:32:35 1.1.1.3 @@ -1,19 +1,25 @@ -/* $Id: testgetifaddr.c,v 1.1.1.2 2012/05/29 12:55:57 misho Exp $ */ +/* $Id: testgetifaddr.c,v 1.1.1.3 2013/07/22 00:32:35 misho Exp $ */ /* MiniUPnP project * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ - * (c) 2006-2011 Thomas Bernard + * (c) 2006-2011 Thomas Bernard * This software is subject to the conditions detailed * in the LICENCE file provided within the distribution */ #include #include #include "getifaddr.h" +#if defined(__sun) +/* solaris 10 does not define LOG_PERROR */ +#define LOG_PERROR 0 +#endif + int main(int argc, char * * argv) { char addr[64]; if(argc < 2) { fprintf(stderr, "Usage:\t%s interface_name\n", argv[0]); return 1; } + openlog("testgetifaddr", LOG_CONS|LOG_PERROR, LOG_USER); if(getifaddr(argv[1], addr, sizeof(addr)) < 0) { fprintf(stderr, "Cannot get address for interface %s.\n", argv[1]);