From 061e2dd4313a7a52cd9f61aeb8e573b01fe49170 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Fri, 27 Jul 2012 13:17:14 +0000 Subject: [PATCH] fix so that make unbound-host works when compiled with libnss. git-svn-id: file:///svn/unbound/trunk@2726 be551aaa-1e26-0410-a405-d3ace91eadb9 --- smallapp/unbound-host.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/smallapp/unbound-host.c b/smallapp/unbound-host.c index 095396749..ed52a551f 100644 --- a/smallapp/unbound-host.c +++ b/smallapp/unbound-host.c @@ -61,6 +61,9 @@ #endif #include "libunbound/unbound.h" #include +#ifdef HAVE_NSS +#include +#endif /** verbosity for unbound-host app */ static int verb = 0; @@ -509,6 +512,12 @@ int main(int argc, char* argv[]) if(argc != 1) usage(); +#ifdef HAVE_NSS + if(NSS_NoDB_Init(".") != SECSuccess) { + fprintf(stderr, "could not init NSS\n"); + return 1; + } +#endif lookup(ctx, argv[0], qtype, qclass); return 0; }