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.
#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"