From: Wouter Wijngaards Date: Fri, 27 Jul 2012 13:17:14 +0000 (+0000) Subject: fix so that make unbound-host works when compiled with libnss. X-Git-Tag: release-1.4.18rc2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=061e2dd4313a7a52cd9f61aeb8e573b01fe49170;p=thirdparty%2Funbound.git fix so that make unbound-host works when compiled with libnss. git-svn-id: file:///svn/unbound/trunk@2726 be551aaa-1e26-0410-a405-d3ace91eadb9 --- 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; }