From e0c6df7703cb474f5daa9ecd23ab5a269dab4118 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Wed, 17 Apr 2019 15:45:29 +0200 Subject: [PATCH] net.c: Include netdb.h only if HAVE_NETDB_H is defined Platforms that do not have getaddrinfo() most likely do not have the netdb.h include file as well. This change includes netdb.h only if HAVE_NETDB_H is defined (usually by configure). --- src/net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/net.c b/src/net.c index dfe0540f..f6003fae 100644 --- a/src/net.c +++ b/src/net.c @@ -35,7 +35,9 @@ #include #endif +#ifdef HAVE_NETDB_H #include +#endif #ifdef WITH_LWIP #include