run-command: dup_devnull(): guard against syscalls failing
[gitweb.git] / git-compat-util.h
index 590d5d3188aed8f3a2b0b7050f2502b28cb4f5fa..9c01e9bc2eaaa9fe302228263bcc0e1e5e9196f8 100644 (file)
@@ -209,6 +209,17 @@ extern char *gitbasename(char *);
 #include <openssl/err.h>
 #endif
 
+/* On most systems <netdb.h> would have given us this, but
+ * not on some systems (e.g. z/OS).
+ */
+#ifndef NI_MAXHOST
+#define NI_MAXHOST 1025
+#endif
+
+#ifndef NI_MAXSERV
+#define NI_MAXSERV 32
+#endif
+
 /* On most systems <limits.h> would have given us this, but
  * not on some systems (e.g. GNU/Hurd).
  */