fix so that make unbound-host works when compiled with libnss.

git-svn-id: file:///svn/unbound/trunk@2726 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2012-07-27 13:17:14 +00:00
parent 76f273aed5
commit 061e2dd431

View File

@ -61,6 +61,9 @@
#endif #endif
#include "libunbound/unbound.h" #include "libunbound/unbound.h"
#include <ldns/ldns.h> #include <ldns/ldns.h>
#ifdef HAVE_NSS
#include <nss3/nss.h>
#endif
/** verbosity for unbound-host app */ /** verbosity for unbound-host app */
static int verb = 0; static int verb = 0;
@ -509,6 +512,12 @@ int main(int argc, char* argv[])
if(argc != 1) if(argc != 1)
usage(); 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); lookup(ctx, argv[0], qtype, qclass);
return 0; return 0;
} }