--- SVN-Latest\nbase\nbase_misc.c Wed Dec 27 15:46:14 2006 +++ nbase\nbase_misc.c Wed Jan 24 13:16:48 2007 @@ -117,6 +117,10 @@ #define INET6_ADDRSTRLEN 46 #endif +#ifndef AF_UNSPEC +#define AF_UNSPEC 0 +#endif + /* Returns the UNIX/Windows errno-equivalent. Note that the Windows call is socket/networking specific. The windows error number returned is like WSAMSGSIZE, but nbase.h includes #defines to @@ -150,6 +154,9 @@ return NULL; return inet_ntop(AF_INET, &sin->sin_addr, str, sizeof(str)); } + /* On Win32 this could mean the iface is down */ + else if (sin->sin_family == AF_UNSPEC) + return NULL; #if HAVE_IPV6 else { assert(sin->sin_family == AF_INET6);