From: Andre Noll Date: Mon, 3 Dec 2007 16:25:30 +0000 (+0100) Subject: Fix compilation on NetBSD. X-Git-Tag: v0.3.0~73^2~2 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=e5c63af4f631e706c8c8793f5db862c80948925c;p=paraslash.git Fix compilation on NetBSD. At least on NetBSD-3.1, AI_V4MAPPED, AI_ALL, and AI_ADDRCONFIG are all undefined. The fix is to #define these to zero if they are not defined in netdb.h. This means that no hints will be given in this case which is the best we can do. --- diff --git a/net.c b/net.c index 2add4844..076600fc 100644 --- a/net.c +++ b/net.c @@ -8,6 +8,18 @@ #include +/* At least NetBSD needs these. */ +#ifndef AI_V4MAPPED +#define AI_V4MAPPED 0 +#endif +#ifndef AI_ALL +#define AI_ALL 0 +#endif +#ifndef AI_ADDRCONFIG +#define AI_ADDRCONFIG 0 +#endif + + #include "para.h" #include "error.h" #include "net.h"