getaddrinfo: Define macros lacking in NetBSD 5.0.
authorLudovic Courtès <ludo@gnu.org>
Wed, 17 Feb 2010 00:14:26 +0000 (01:14 +0100)
committerLudovic Courtès <ludo@gnu.org>
Wed, 17 Feb 2010 00:14:26 +0000 (01:14 +0100)
* libguile/net_db.c (AI_ALL, AI_V4MAPPED, AI_ADDRCONFIG): New
  macros, when not already defined.

libguile/net_db.c

index bcba18e..eb0c4c3 100644 (file)
@@ -73,6 +73,17 @@ extern int h_errno;
 extern const char *hstrerror (int);
 #endif
 
+/* NetBSD 5.0 lacks the following flags.  */
+#ifndef AI_ALL
+# define AI_ALL 0
+#endif
+#ifndef AI_V4MAPPED
+# define AI_V4MAPPED 0
+#endif
+#ifndef AI_ADDRCONFIG
+# define AI_ADDRCONFIG 0
+#endif
+
 \f
 
 SCM_SYMBOL (scm_host_not_found_key, "host-not-found");