Fix for GCC 7.0

This commit is contained in:
Morten Stevens 2017-02-14 13:49:28 +01:00
parent 2b12183353
commit 903f936009
2 changed files with 28 additions and 1 deletions

22
pdns-gcc70.patch Normal file
View File

@ -0,0 +1,22 @@
From f226db2f2c12a2c0c16b3125a0438d9aca0d017c Mon Sep 17 00:00:00 2001
From: Pieter Lexis <pieter.lexis@powerdns.com>
Date: Fri, 23 Sep 2016 17:09:11 +0200
Subject: [PATCH] Silence a GCC 6.2 compiler warning
---
pdns/recpacketcache.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pdns/recpacketcache.cc b/pdns/recpacketcache.cc
index 811d0a7..1d24831 100644
--- a/pdns/recpacketcache.cc
+++ b/pdns/recpacketcache.cc
@@ -211,7 +211,7 @@ uint64_t RecursorPacketCache::size()
uint64_t RecursorPacketCache::bytes()
{
uint64_t sum=0;
- for(const struct Entry& e : d_packetCache) {
+ for(const auto& e : d_packetCache) {
sum += sizeof(e) + e.d_packet.length() + 4;
}
return sum;

View File

@ -3,7 +3,7 @@
Name: pdns
Version: 4.0.3
Release: 4%{?dist}
Release: 5%{?dist}
Summary: A modern, advanced and high performance authoritative-only nameserver
Group: System Environment/Daemons
License: GPLv2
@ -13,6 +13,7 @@ Source1: pdns.service
Patch0: pdns-disable-secpoll.patch
Patch1: fix-unit-tests-32bit.patch
Patch2: fix-negative-ipv6-32bit.patch
Patch3: pdns-gcc70.patch
Requires(pre): shadow-utils
Requires(post): systemd-units
@ -155,6 +156,7 @@ This package contains the TinyDNS backend for %{name}
%patch0 -p1 -b .disable-secpoll
%patch1 -p1 -b .fix-unit-tests-32bit
%patch2 -p1 -b .fix-negative-ipv6-32bit
%patch3 -p1 -b .gcc70
%build
export CPPFLAGS="-DLDAP_DEPRECATED"
@ -316,6 +318,9 @@ exit 0
%{_libdir}/%{name}/libtinydnsbackend.so
%changelog
* Tue Feb 14 2017 Morten Stevens <mstevens@fedoraproject.org> - 4.0.3-5
- Fix for GCC 7.0
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild