Skip to content

Commit 2b0dda5

Browse files
committed
Merge branch 'dm/ni-maxhost-may-be-missing' into maint-1.8.1
Some sources failed to compile on systems that lack NI_MAXHOST in their system header. * dm/ni-maxhost-may-be-missing: git-compat-util.h: Provide missing netdb.h definitions
2 parents 402c2a7 + 3b130ad commit 2b0dda5

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

daemon.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
#define HOST_NAME_MAX 256
1010
#endif
1111

12-
#ifndef NI_MAXSERV
13-
#define NI_MAXSERV 32
14-
#endif
15-
1612
#ifdef NO_INITGROUPS
1713
#define initgroups(x, y) (0) /* nothing */
1814
#endif

git-compat-util.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,17 @@ extern char *gitbasename(char *);
209209
#include <openssl/err.h>
210210
#endif
211211

212+
/* On most systems <netdb.h> would have given us this, but
213+
* not on some systems (e.g. z/OS).
214+
*/
215+
#ifndef NI_MAXHOST
216+
#define NI_MAXHOST 1025
217+
#endif
218+
219+
#ifndef NI_MAXSERV
220+
#define NI_MAXSERV 32
221+
#endif
222+
212223
/* On most systems <limits.h> would have given us this, but
213224
* not on some systems (e.g. GNU/Hurd).
214225
*/

0 commit comments

Comments
 (0)