krb5 commit: Fix net-server.c when AI_NUMERICSERV is undefined
ghudson at mit.edu
ghudson at mit.edu
Wed Jun 1 00:52:59 EDT 2022
https://github.com/krb5/krb5/commit/f8ecc0ae74c7ebd84f042e28079aa6b4b2ae405c
commit f8ecc0ae74c7ebd84f042e28079aa6b4b2ae405c
Author: Sergey Fedorov <vital.had at gmail.com>
Date: Fri May 27 01:06:38 2022 +0800
Fix net-server.c when AI_NUMERICSERV is undefined
Some macOS versions do not define AI_NUMERICSERV. Other source files
check whether it is defined before using it; do so here as well.
[ghudson at mit.edu: rewrote commit message; slightly changed approach]
ticket: 9062 (new)
tags: pullup
target_version: 1.20-next
src/lib/apputils/net-server.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/lib/apputils/net-server.c b/src/lib/apputils/net-server.c
index 294dcfc89..1bdc7932b 100644
--- a/src/lib/apputils/net-server.c
+++ b/src/lib/apputils/net-server.c
@@ -828,7 +828,10 @@ setup_addresses(verto_ctx *ctx, void *handle, const char *prog,
* resolution. */
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC;
- hints.ai_flags = AI_PASSIVE | AI_NUMERICSERV;
+ hints.ai_flags = AI_PASSIVE;
+#ifdef AI_NUMERICSERV
+ hints.ai_flags |= AI_NUMERICSERV;
+#endif
/* Add all the requested addresses. */
for (i = 0; i < bind_addresses.n; i++) {
More information about the cvs-krb5
mailing list