From efc654f85a2ee050a4c0d54cc794d01cae136fc7 Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Fri, 21 Jun 2024 14:11:56 +0200 Subject: [PATCH] Missing NETDB_INTERNAL now falls back to -1 --- CHANGES | 3 +++ compat.h | 2 ++ xio-ip.c | 3 +++ 3 files changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index 3b24c7b..67aec60 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,9 @@ Porting: New Linux distributions dislike egrep, fgrep + When NETDB_INTERNAL is not available it should be set to -1. + Thanks to Baruch Siach for sending a patch. + Testing: test.sh: lots of corrections and improvements diff --git a/compat.h b/compat.h index bb7e2d8..72e73c7 100644 --- a/compat.h +++ b/compat.h @@ -851,6 +851,8 @@ typedef unsigned long T_sigset; #if !defined(NETDB_INTERNAL) && defined(h_NETDB_INTERNAL) # define NETDB_INTERNAL h_NETDB_INTERNAL +#elif !defined(NETDB_INTERNAL) +# define NETDB_INTERNAL (-1) #endif #ifndef INET_ADDRSTRLEN diff --git a/xio-ip.c b/xio-ip.c index 2f35448..c67aaa2 100644 --- a/xio-ip.c +++ b/xio-ip.c @@ -391,6 +391,9 @@ int xiogetaddrinfo(const char *node, const char *service, } } +#else + Error("no resolver function available"); + return STAT_NORETRY; #endif if (numnode) free(numnode);