From 6524912adc6e3000aa91d5d416a400fbc5cbf066 Mon Sep 17 00:00:00 2001 From: Bernhard Froehlich Date: Tue, 11 Dec 2018 12:34:58 +0000 Subject: dns/dnsperf: Fix building with bind 9.12 and newer Patches are partially based on ISC upstream commit 64fe6bbaf2019f444475dfbf744eb6ea4e619c19 the other parts are mine. PR: 232774 Reported by: leeb@ratnaling.org Approved by: portmgr (blanket) Obtained from: https://gitlab.isc.org/isc-projects/bind9/commit/64fe6bbaf2019f444475dfbf744eb6ea4e619c19 --- dns/dnsperf/Makefile | 4 +--- dns/dnsperf/files/patch-datafile.c | 12 +++++++++++ dns/dnsperf/files/patch-dns.c | 14 +++++++++++++ dns/dnsperf/files/patch-dnsperf.c | 43 ++++++++++++++++++++++++++++++++++++++ dns/dnsperf/files/patch-log.c | 11 ++++++++++ dns/dnsperf/files/patch-opt.c | 12 +++++++++++ dns/dnsperf/files/patch-os.c | 11 ++++++++++ dns/dnsperf/files/patch-resperf.c | 37 ++++++++++++++++++++++++++++++++ 8 files changed, 141 insertions(+), 3 deletions(-) create mode 100644 dns/dnsperf/files/patch-datafile.c create mode 100644 dns/dnsperf/files/patch-dns.c create mode 100644 dns/dnsperf/files/patch-dnsperf.c create mode 100644 dns/dnsperf/files/patch-log.c create mode 100644 dns/dnsperf/files/patch-opt.c create mode 100644 dns/dnsperf/files/patch-os.c create mode 100644 dns/dnsperf/files/patch-resperf.c (limited to 'dns') diff --git a/dns/dnsperf/Makefile b/dns/dnsperf/Makefile index bc33debd2ab7..6831fa1eab8d 100644 --- a/dns/dnsperf/Makefile +++ b/dns/dnsperf/Makefile @@ -3,7 +3,7 @@ PORTNAME= dnsperf PORTVERSION= 2.1.0.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= dns benchmarks net MASTER_SITES= ftp://ftp.nominum.com/pub/nominum/${PORTNAME}/${PORTVERSION}/ DISTNAME= ${PORTNAME}-src-${PORTVERSION}-1 @@ -13,8 +13,6 @@ COMMENT= Performance measurement of Domain Name System (DNS) servers LICENSE= ISCL -BROKEN= fails to build - BUILD_DEPENDS= isc-config.sh:dns/bind912 LIB_DEPENDS= liblmdb.so:databases/lmdb \ libjson-c.so:devel/json-c diff --git a/dns/dnsperf/files/patch-datafile.c b/dns/dnsperf/files/patch-datafile.c new file mode 100644 index 000000000000..03fd4fd76274 --- /dev/null +++ b/dns/dnsperf/files/patch-datafile.c @@ -0,0 +1,12 @@ +--- datafile.c.orig 2015-12-16 00:46:49 UTC ++++ datafile.c +@@ -23,7 +23,9 @@ + + #define ISC_BUFFER_USEINLINE + ++#include + #include ++#include + #include + + #include "datafile.h" diff --git a/dns/dnsperf/files/patch-dns.c b/dns/dnsperf/files/patch-dns.c new file mode 100644 index 000000000000..d88c2b324884 --- /dev/null +++ b/dns/dnsperf/files/patch-dns.c @@ -0,0 +1,14 @@ +--- dns.c.orig 2015-12-16 00:46:50 UTC ++++ dns.c +@@ -41,9 +41,11 @@ + #define ISC_BUFFER_USEINLINE + + #include ++#include + #include + #include + #include ++#include + #include + #include + #include diff --git a/dns/dnsperf/files/patch-dnsperf.c b/dns/dnsperf/files/patch-dnsperf.c new file mode 100644 index 000000000000..19a9ea902aab --- /dev/null +++ b/dns/dnsperf/files/patch-dnsperf.c @@ -0,0 +1,43 @@ +--- dnsperf.c.orig 2015-12-16 00:46:49 UTC ++++ dnsperf.c +@@ -52,8 +52,10 @@ + + #define ISC_BUFFER_USEINLINE + ++#include + #include + #include ++#include + #include + #include + #include +@@ -280,16 +282,16 @@ print_statistics(const config_t *config, const times_t + + printf("Statistics:\n\n"); + +- printf(" %s sent: %" ISC_PRINT_QUADFORMAT "u\n", ++ printf(" %s sent: %" PRIu64 "\n", + units, stats->num_sent); +- printf(" %s completed: %" ISC_PRINT_QUADFORMAT "u (%.2lf%%)\n", ++ printf(" %s completed: %" PRIu64 " (%.2lf%%)\n", + units, stats->num_completed, + SAFE_DIV(100.0 * stats->num_completed, stats->num_sent)); +- printf(" %s lost: %" ISC_PRINT_QUADFORMAT "u (%.2lf%%)\n", ++ printf(" %s lost: %" PRIu64 " (%.2lf%%)\n", + units, stats->num_timedout, + SAFE_DIV(100.0 * stats->num_timedout, stats->num_sent)); + if (stats->num_interrupted > 0) +- printf(" %s interrupted: %" ISC_PRINT_QUADFORMAT "u " ++ printf(" %s interrupted: %" PRIu64 " " + "(%.2lf%%)\n", + units, stats->num_interrupted, + SAFE_DIV(100.0 * stats->num_interrupted, +@@ -305,7 +307,7 @@ print_statistics(const config_t *config, const times_t + first_rcode = ISC_FALSE; + else + printf(", "); +- printf("%s %" ISC_PRINT_QUADFORMAT "u (%.2lf%%)", ++ printf("%s %" PRIu64 " (%.2lf%%)", + perf_dns_rcode_strings[i], stats->rcodecounts[i], + (stats->rcodecounts[i] * 100.0) / stats->num_completed); + } diff --git a/dns/dnsperf/files/patch-log.c b/dns/dnsperf/files/patch-log.c new file mode 100644 index 000000000000..0b5ca4df894d --- /dev/null +++ b/dns/dnsperf/files/patch-log.c @@ -0,0 +1,11 @@ +--- log.c.orig 2015-12-16 00:46:50 UTC ++++ log.c +@@ -20,6 +20,8 @@ + #include + #include + ++#include ++ + #include "log.h" + #include "util.h" + diff --git a/dns/dnsperf/files/patch-opt.c b/dns/dnsperf/files/patch-opt.c new file mode 100644 index 000000000000..bd2b01b4a0fa --- /dev/null +++ b/dns/dnsperf/files/patch-opt.c @@ -0,0 +1,12 @@ +--- opt.c.orig 2015-12-16 00:46:50 UTC ++++ opt.c +@@ -22,7 +22,9 @@ + + #include + ++#include + #include ++#include + #include + #include + diff --git a/dns/dnsperf/files/patch-os.c b/dns/dnsperf/files/patch-os.c new file mode 100644 index 000000000000..17ea753671c3 --- /dev/null +++ b/dns/dnsperf/files/patch-os.c @@ -0,0 +1,11 @@ +--- os.c.orig 2015-12-16 00:46:49 UTC ++++ os.c +@@ -22,6 +22,8 @@ + + #include + ++#include ++#include + #include + #include + diff --git a/dns/dnsperf/files/patch-resperf.c b/dns/dnsperf/files/patch-resperf.c new file mode 100644 index 000000000000..1e78729175df --- /dev/null +++ b/dns/dnsperf/files/patch-resperf.c @@ -0,0 +1,37 @@ +--- resperf.c.orig 2015-12-16 00:46:50 UTC ++++ resperf.c +@@ -46,8 +46,10 @@ + + #include + ++#include + #include + #include ++#include + #include + #include + #include +@@ -389,11 +391,11 @@ print_statistics(void) { + + printf("\nStatistics:\n\n"); + +- printf(" Queries sent: %" ISC_PRINT_QUADFORMAT "u\n", ++ printf(" Queries sent: %" PRIu64 "\n", + num_queries_sent); +- printf(" Queries completed: %" ISC_PRINT_QUADFORMAT "u\n", ++ printf(" Queries completed: %" PRIu64 "\n", + num_responses_received); +- printf(" Queries lost: %" ISC_PRINT_QUADFORMAT "u\n", ++ printf(" Queries lost: %" PRIu64 "\n", + num_queries_sent - num_responses_received); + printf(" Response codes: "); + first_rcode = ISC_TRUE; +@@ -404,7 +406,7 @@ print_statistics(void) { + first_rcode = ISC_FALSE; + else + printf(", "); +- printf("%s %" ISC_PRINT_QUADFORMAT "u (%.2lf%%)", ++ printf("%s %" PRIu64 " (%.2lf%%)", + perf_dns_rcode_strings[i], rcodecounts[i], + (rcodecounts[i] * 100.0) / num_responses_received); + } -- cgit v1.2.3