Skip to content

Commit

Permalink
src: Explicitly include <netdb.h>.
Browse files Browse the repository at this point in the history
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>.
  • Loading branch information
EdSchouten committed Nov 1, 2017
1 parent c715007 commit dc2ae93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cares_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
#include <vector>
#include <unordered_set>

#ifdef __POSIX__
# include <netdb.h>
#endif // __POSIX__

#if defined(__ANDROID__) || \
defined(__MINGW32__) || \
defined(__OpenBSD__) || \
Expand Down

0 comments on commit dc2ae93

Please sign in to comment.