krb5 commit [krb5-1.20]: Fix net-server.c when AI_NUMERICSERV is undefined
ghudson at mit.edu
ghudson at mit.edu
Tue Nov 15 11:31:34 EST 2022
https://github.com/krb5/krb5/commit/6401b303ad7bcd56228ba77fdcbea9625b168115
commit 6401b303ad7bcd56228ba77fdcbea9625b168115
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]
(cherry picked from commit f8ecc0ae74c7ebd84f042e28079aa6b4b2ae405c)
ticket: 9062
version_fixed: 1.20.1
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