From 53800415a9edac2a703b52dcbf36258ad6a6a916 Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Sun, 17 Apr 2016 14:11:32 +0200 Subject: [PATCH] Fix Windows gnulib/c-ares incompatibility of select() * src/host.c: Undef 'select' on Windows --- src/host.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/host.c b/src/host.c index d654feef..a499938c 100644 --- a/src/host.c +++ b/src/host.c @@ -694,6 +694,13 @@ address_list_from_hostent (struct hostent *host) return al; } +/* Since GnuLib's select() (i.e. rpl_select()) cannot handle socket-numbers + * returned from C-ares, we must use the original select() from Winsock. + */ +#ifdef WINDOWS +#undef select +#endif + static void wait_ares (ares_channel channel) {