summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGert Doering <gert@greenie.muc.de>2015-04-27 21:27:21 +0200
committerGert Doering <gert@greenie.muc.de>2015-05-23 21:36:21 +0200
commitae9aff25c5a74e770a29a3a675f5b8f8dd8c5bf8 (patch)
tree7b11e9d1fbb9d0832cb52921c85f07aec2fe7d5b /src
parent6f789d2ec6b6aacb46ab27f1482222c6981faab6 (diff)
downloadopenvpn-ae9aff25c5a74e770a29a3a675f5b8f8dd8c5bf8.tar.gz
openvpn-ae9aff25c5a74e770a29a3a675f5b8f8dd8c5bf8.tar.xz
openvpn-ae9aff25c5a74e770a29a3a675f5b8f8dd8c5bf8.zip
assume res_init() is always there.
Previously, the code tried to find res_init(), and on some systems got it wrong in configure, silently not-using res_init(), leading to unexpected failures to re-init the resolver. We know that all supported OSes (except Windows) have res_init(), so change the call to "#ifndef WIN32", and adjust configure.ac to just find the library to link (if any). With that, failures to find res_init() are no longer "hidden" but clearly visible at link time. AC_SEARCH_LIBS() bits inspired by CUPS' cups_network.m4 (GPLv2) Fix (part of) trac #523 Signed-off-by: Gert Doering <gert@greenie.muc.de> Lazy-ACK-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1430162841-5840-1-git-send-email-gert@greenie.muc.de> URL: http://article.gmane.org/gmane.network.openvpn.devel/9614 (cherry picked from commit 403dc434d245e5df5ae262935aa2e7364547e260)
Diffstat (limited to 'src')
-rw-r--r--src/openvpn/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c
index 6e68c18..af13e36 100644
--- a/src/openvpn/socket.c
+++ b/src/openvpn/socket.c
@@ -137,7 +137,7 @@ openvpn_getaddrinfo (unsigned int flags,
ASSERT(res);
-#if defined(HAVE_RES_INIT)
+#ifndef WIN32
res_init ();
#endif