Skip to content

Commit dc2ae93

Browse files
committed
src: Explicitly include <netdb.h>.
cares_wrap.cc calls into functions like getnameinfo() and getaddrinfo(). These functions tend to be available implicitly through <uv.h>, but we'd better still include this header explicitly. On CloudABI, we make use of a custom implementation of libuv that does not implicitly include header files like <netdb.h>.
1 parent c715007 commit dc2ae93

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cares_wrap.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
#include <vector>
3939
#include <unordered_set>
4040

41+
#ifdef __POSIX__
42+
# include <netdb.h>
43+
#endif // __POSIX__
44+
4145
#if defined(__ANDROID__) || \
4246
defined(__MINGW32__) || \
4347
defined(__OpenBSD__) || \

0 commit comments

Comments
 (0)