summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2020-02-15 10:58:14 +0000
committerflorian <florian@openbsd.org>2020-02-15 10:58:14 +0000
commitd6a4b6f0035f4a064a744a3684a8d9d41a27a8dc (patch)
tree06fcc3764738f99c475bc865f1eeff7b355185db
parentunifdef VALREGEX_REPORT_REASON, it doesn't provide much clarity. (diff)
downloadwireguard-openbsd-d6a4b6f0035f4a064a744a3684a8d9d41a27a8dc.tar.xz
wireguard-openbsd-d6a4b6f0035f4a064a744a3684a8d9d41a27a8dc.zip
get path to resolv.conf from resolv.h
-rw-r--r--usr.bin/dig/dig.h4
-rw-r--r--usr.bin/dig/dighost.c7
2 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/dig/dig.h b/usr.bin/dig/dig.h
index b1c6e512769..92b95578575 100644
--- a/usr.bin/dig/dig.h
+++ b/usr.bin/dig/dig.h
@@ -35,10 +35,6 @@
/*% Buffer Size */
#define BUFSIZE 512
#define COMMSIZE 0xffff
-#ifndef RESOLV_CONF
-/*% location of resolve.conf */
-#define RESOLV_CONF "/etc/resolv.conf"
-#endif
/*% output buffer */
#define OUTPUTBUF 32767
/*% Max RR Limit */
diff --git a/usr.bin/dig/dighost.c b/usr.bin/dig/dighost.c
index b7ccef84dc8..c4bf27f22ab 100644
--- a/usr.bin/dig/dighost.c
+++ b/usr.bin/dig/dighost.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dighost.c,v 1.5 2020/02/13 19:29:47 florian Exp $ */
+/* $Id: dighost.c,v 1.6 2020/02/15 10:58:14 florian Exp $ */
/*! \file
* \note
@@ -30,6 +30,7 @@
#include <limits.h>
#include <locale.h>
#include <netdb.h>
+#include <resolv.h>
#include <stdlib.h>
#include <string.h>
@@ -1259,9 +1260,9 @@ setup_system(isc_boolean_t ipv4only, isc_boolean_t ipv6only) {
lwresflags |= LWRES_USEIPV6;
lwres_conf_init(lwconf, lwresflags);
- lwresult = lwres_conf_parse(lwconf, RESOLV_CONF);
+ lwresult = lwres_conf_parse(lwconf, _PATH_RESCONF);
if (lwresult != LWRES_R_SUCCESS && lwresult != LWRES_R_NOTFOUND)
- fatal("parse of %s failed", RESOLV_CONF);
+ fatal("parse of %s failed", _PATH_RESCONF);
/* Make the search list */
if (lwconf->searchnxt > 0)