]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Fix compilation on NetBSD.
authorAndre Noll <maan@systemlinux.org>
Mon, 3 Dec 2007 16:25:30 +0000 (17:25 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 3 Dec 2007 16:25:30 +0000 (17:25 +0100)
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

diff --git a/net.c b/net.c
index 2add48449f26fd46345a5644df00700df3ab5826..076600fc45f2952212835339ac4e991ee0e5edc6 100644 (file)
--- a/net.c
+++ b/net.c
@@ -8,6 +8,18 @@
 
 #include <netdb.h>
 
+/* 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"