summaryrefslogtreecommitdiff
path: root/lib/libc/asr/getrrsetbyname.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/asr/getrrsetbyname.c')
-rw-r--r--lib/libc/asr/getrrsetbyname.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/asr/getrrsetbyname.c b/lib/libc/asr/getrrsetbyname.c
index 12bb56b06f8..9cafae80877 100644
--- a/lib/libc/asr/getrrsetbyname.c
+++ b/lib/libc/asr/getrrsetbyname.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getrrsetbyname.c,v 1.1 2012/09/08 11:08:21 eric Exp $ */
+/* $OpenBSD: getrrsetbyname.c,v 1.2 2013/05/27 17:31:01 eric Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
@@ -32,6 +32,8 @@ getrrsetbyname(const char *name, unsigned int class, unsigned int type,
struct async_res ar;
int r, saved_errno = errno;
+ res_init();
+
as = getrrsetbyname_async(name, class, type, flags, NULL);
if (as == NULL) {
r = (errno == ENOMEM) ? ERRSET_NOMEMORY : ERRSET_FAIL;