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).
This commit is contained in:
Olaf Bergmann committed 2019-04-17 15:45:29 +02:00
1 parent 933ddcbf20
commit e0c6df7703
1 file changed
+2
+2
View File
@@ -35,7 +35,9 @@
#include <ws2tcpip.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef WITH_LWIP
#include <lwip/pbuf.h>