aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-03-19 12:18:21 -0700
committerJunio C Hamano <gitster@pobox.com>2013-03-19 12:18:21 -0700
commit31ccd35df4b7599c83fe46669ca36ca2c4fb3caa (patch)
tree08e677175891dc5a7397ab78225dedf8ba4bbd33
parent3ae5d5016e71a206be1f79fe873a2016ed56d7d1 (diff)
parent3b130ade45c70af63c7692387b65f161770a8ccc (diff)
downloadgit-31ccd35df4b7599c83fe46669ca36ca2c4fb3caa.tar.gz
git-31ccd35df4b7599c83fe46669ca36ca2c4fb3caa.tar.xz
Merge branch 'dm/ni-maxhost-may-be-missing'
On systems without NI_MAXHOST in their system header files, connect.c (hence most of the transport) did not compile. * dm/ni-maxhost-may-be-missing: git-compat-util.h: Provide missing netdb.h definitions
-rw-r--r--daemon.c4
-rw-r--r--git-compat-util.h11
2 files changed, 11 insertions, 4 deletions
diff --git a/daemon.c b/daemon.c
index 4602b46a5..df8c0ab05 100644
--- a/daemon.c
+++ b/daemon.c
@@ -9,10 +9,6 @@
#define HOST_NAME_MAX 256
#endif
-#ifndef NI_MAXSERV
-#define NI_MAXSERV 32
-#endif
-
#ifdef NO_INITGROUPS
#define initgroups(x, y) (0) /* nothing */
#endif
diff --git a/git-compat-util.h b/git-compat-util.h
index b636e0dd0..e715285e7 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -213,6 +213,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).
*/