summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/sethostent.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2005-03-30 02:58:28 +0000
committertedu <tedu@openbsd.org>2005-03-30 02:58:28 +0000
commitec39ddb4424b6bc756d30ed05f0300b3e90a12a7 (patch)
tree89814f2e05c22c2bac04c30a405e7012ffce5efb /lib/libc/net/sethostent.c
parentadd lladdr command to ifconfig to set MAC address. diffs from freebsd via (diff)
downloadwireguard-openbsd-ec39ddb4424b6bc756d30ed05f0300b3e90a12a7.tar.xz
wireguard-openbsd-ec39ddb4424b6bc756d30ed05f0300b3e90a12a7.zip
make the resolver stat resolv.conf and update if it changes.
useful feedback and ok deraadt@
Diffstat (limited to 'lib/libc/net/sethostent.c')
-rw-r--r--lib/libc/net/sethostent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/sethostent.c b/lib/libc/net/sethostent.c
index 2140d65d08b..c0eae942ca0 100644
--- a/lib/libc/net/sethostent.c
+++ b/lib/libc/net/sethostent.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: sethostent.c,v 1.7 2005/03/25 13:24:12 otto Exp $";
+static char rcsid[] = "$OpenBSD: sethostent.c,v 1.8 2005/03/30 02:58:28 tedu Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -44,7 +44,7 @@ sethostent(int stayopen)
{
struct __res_state *_resp = _THREAD_PRIVATE(_res, _res, &_res);
- if ((_resp->options & RES_INIT) == 0 && res_init() == -1)
+ if (_res_init(0) == -1)
return;
if (stayopen)
_resp->options |= RES_STAYOPEN | RES_USEVC;