- GCC 4.3 fixes

This commit is contained in:
Ruben Kerkhof 2008-02-09 14:53:39 +00:00
parent 95a29d0b67
commit bb7118c82e
2 changed files with 59 additions and 1 deletions

53
pdns-gcc43.patch Normal file
View File

@ -0,0 +1,53 @@
diff -up pdns-2.9.21/pdns/misc.hh.orig pdns-2.9.21/pdns/misc.hh
--- pdns-2.9.21/pdns/misc.hh.orig 2008-02-09 15:32:57.000000000 +0100
+++ pdns-2.9.21/pdns/misc.hh 2008-02-09 15:33:23.000000000 +0100
@@ -19,6 +19,7 @@
#ifndef MISC_HH
#define MISC_HH
#include <stdint.h>
+#include <cstring>
#if 0
#define RDTSC(qp) \
@@ -234,7 +235,7 @@ inline bool dns_isspace(char c)
return c==' ' || c=='\t' || c=='\r' || c=='\n';
}
-inline const char dns_tolower(char c)
+inline char dns_tolower(char c)
{
if(c>='A' && c<='Z')
c+='a'-'A';
diff -up pdns-2.9.21/pdns/dns.hh.orig pdns-2.9.21/pdns/dns.hh
--- pdns-2.9.21/pdns/dns.hh.orig 2008-02-09 15:37:26.000000000 +0100
+++ pdns-2.9.21/pdns/dns.hh 2008-02-09 15:37:43.000000000 +0100
@@ -115,7 +115,7 @@ struct EDNS0Record
#pragma pack (pop)
#endif
-typedef enum {
+enum {
ns_t_invalid = 0, /* Cookie. */
ns_t_a = 1, /* Host address. */
ns_t_ns = 2, /* Authoritative server. */
diff -up pdns-2.9.21/modules/ldapbackend/powerldap.cc.orig pdns-2.9.21/modules/ldapbackend/powerldap.cc
--- pdns-2.9.21/modules/ldapbackend/powerldap.cc.orig 2008-02-09 15:41:12.000000000 +0100
+++ pdns-2.9.21/modules/ldapbackend/powerldap.cc 2008-02-09 15:42:17.000000000 +0100
@@ -1,4 +1,6 @@
#include "powerldap.hh"
+// for timeval
+#include <sys/time.h>
diff -up pdns-2.9.21/pdns/dynmessenger.cc.orig pdns-2.9.21/pdns/dynmessenger.cc
--- pdns-2.9.21/pdns/dynmessenger.cc.orig 2008-02-09 15:47:52.000000000 +0100
+++ pdns-2.9.21/pdns/dynmessenger.cc 2008-02-09 15:48:38.000000000 +0100
@@ -18,6 +18,7 @@
*/
#include "dynmessenger.hh"
#include <cstdio>
+#include <cstdlib>
#include <cstring>
#include <cerrno>
#include <iostream>

View File

@ -1,7 +1,7 @@
Summary: A modern, advanced and high performance authoritative-only nameserver
Name: pdns
Version: 2.9.21
Release: 3%{?dist}
Release: 4%{?dist}
Group: System Environment/Daemons
License: GPLv2
@ -10,6 +10,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz
Patch0: %{name}-fixinit.patch
Patch1: %{name}-avoid-version.patch
Patch2: %{name}-gcc43.patch
Requires(post): %{_sbindir}/useradd, /sbin/chkconfig
Requires(preun): /sbin/service, /sbin/chkconfig
@ -82,6 +83,7 @@ This package contains the SQLite backend for %{name}
%setup -q
%patch0 -p1 -b .fixinit
%patch1 -p1 -b .avoid-version
%patch2 -p1
%build
export CPPFLAGS="-DLDAP_DEPRECATED %{optflags}"
@ -181,6 +183,9 @@ fi
%changelog
* Sat Feb 09 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21-4
- GCC 4.3 fixes
* Wed Dec 05 2007 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21-3
- Rebuild to pick up new openldap