diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-03-19 23:18:21 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-03-19 23:18:21 +0400 |
commit | 31ccd35df4b7599c83fe46669ca36ca2c4fb3caa (patch) | |
tree | 08e677175891dc5a7397ab78225dedf8ba4bbd33 | |
parent | 3ae5d5016e71a206be1f79fe873a2016ed56d7d1 (diff) | |
parent | 3b130ade45c70af63c7692387b65f161770a8ccc (diff) |
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.c | 4 | ||||
-rw-r--r-- | git-compat-util.h | 11 |
2 files changed, 11 insertions, 4 deletions
@@ -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 b636e0dd0c..e715285e7c 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). */ |