From e5c63af4f631e706c8c8793f5db862c80948925c Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 3 Dec 2007 17:25:30 +0100 Subject: [PATCH] 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. --- net.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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" -- 2.39.5