diff options
author | David Michael <fedora.dm0@gmail.com> | 2013-02-25 20:30:19 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-02-25 21:16:08 +0100 |
commit | 3b130ade45c70af63c7692387b65f161770a8ccc (patch) | |
tree | ab65009003069f5c27e33c92e1d9c10931c27390 /git-compat-util.h | |
parent | Git 1.7.12.4 (diff) | |
download | git-3b130ade45c70af63c7692387b65f161770a8ccc.tar.xz git-3b130ade45c70af63c7692387b65f161770a8ccc.zip |
git-compat-util.h: Provide missing netdb.h definitions
Some platforms may lack the NI_MAXHOST and NI_MAXSERV values in their
system headers, so ensure they are available.
Signed-off-by: David Michael <fedora.dm0@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r-- | git-compat-util.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 000042d793..503282c863 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -178,6 +178,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). */ |