From 6479785360a5f570d409b6cdcb7ff09ef602bf8d Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Fri, 31 Jan 2014 11:25:36 +0000 Subject: [PATCH] fixup nss compile (no ldns in it). fixup warning in unitldns fixup WKS and rdata type service to print unsigned because strings are not portable. git-svn-id: file:///svn/unbound/trunk@3061 be551aaa-1e26-0410-a405-d3ace91eadb9 --- ldns/wire2str.c | 8 ++++++++ testcode/unitldns.c | 2 +- testdata/nss_compile.tpkg | Bin 1055 -> 866 bytes testdata/test_ldnsrr.c3 | 8 ++++---- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ldns/wire2str.c b/ldns/wire2str.c index 25ff58703..e70d1bd58 100644 --- a/ldns/wire2str.c +++ b/ldns/wire2str.c @@ -1432,8 +1432,16 @@ int sldns_wire2str_wks_scan(uint8_t** d, size_t* dl, char** s, size_t* sl) if(!(((*d)[i])&(0x80>>bit))) continue; port = (int)i*8 + bit; + + /* we cannot print with strings because they + * are not portable, the presentation format may + * not be able to be read in on another computer. + */ + service = NULL; + /* service = getservbyport((int)htons((uint16_t)port), proto_name); + */ if(service && service->s_name) w += sldns_str_print(s, sl, " %s", service->s_name); diff --git a/testcode/unitldns.c b/testcode/unitldns.c index a32d81d0c..8f473a31f 100644 --- a/testcode/unitldns.c +++ b/testcode/unitldns.c @@ -153,7 +153,7 @@ rr_test_file(const char* input, const char* check) if(0) { /* debug: create check file */ of = fopen("outputfile", "w"); - if(!of) fatal_exit("cannot write output: %s", input, strerror(errno)); + if(!of) fatal_exit("cannot write output: %s", strerror(errno)); } while(fgets(txt_in, (int)bufs, inf)) { diff --git a/testdata/nss_compile.tpkg b/testdata/nss_compile.tpkg index 20b778a1e4baeebffe57110a4e9d3c6ffc32fdff..d6412017c532e120f17896d8f98504934b6e9f89 100644 GIT binary patch literal 866 zc-jGC1D*UIiwFR?d+SmF1MQY=Z`(Eyfb+HYD-KFfZ$b59`K{290GShaL({@oiuJ>= zC9*`zTx3!psU^YE|GuOA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