summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/replace/system/network.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h
index 5de363f134..c7b499a932 100644
--- a/source4/lib/replace/system/network.h
+++ b/source4/lib/replace/system/network.h
@@ -136,6 +136,17 @@ const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size);
#define AI_ADDRCONFIG 0x0020
#endif
+#ifndef AI_NUMERICSERV
+/*
+ * logic copied from AI_NUMERICHOST
+ */
+#if defined(HAVE_STRUCT_ADDRINFO) && defined(HAVE_GETADDRINFO)
+#define AI_NUMERICSERV 0
+#else
+#define AI_NUMERICSERV 0x0400
+#endif
+#endif
+
#ifndef NI_NUMERICHOST
#define NI_NUMERICHOST 1
#endif