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>
David Michael committed
Feb 25, 2013 at 14:30 UTC
3b130ade45c70af63c7692387b65f161770a8ccc
2 files changed
+11
-4
daemon.c
-4
@@ -9,10 +9,6 @@
9
#define HOST_NAME_MAX 256
10
#endif
11
12
-#ifndef NI_MAXSERV
13
-#define NI_MAXSERV 32
14
-#endif
15
-
12
#ifdef NO_INITGROUPS
13
#define initgroups(x, y) (0) /* nothing */
14
#endif
git-compat-util.h
+11
@@ -178,6 +178,17 @@ extern char *gitbasename(char *);
178
#include <openssl/err.h>
179
#endif
180
181
+/* On most systems <netdb.h> would have given us this, but
182
+ * not on some systems (e.g. z/OS).
183
+ */
184
+#ifndef NI_MAXHOST
185
+#define NI_MAXHOST 1025
186
+#endif
187
+
188
+#ifndef NI_MAXSERV
189
+#define NI_MAXSERV 32
190
+#endif
191
+
192
/* On most systems <limits.h> would have given us this, but
193
* not on some systems (e.g. GNU/Hurd).
194
*/