1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## gcc43-fixes.dpatch by Matthijs Mohlmann <matthijs@cacholong.nl>
4
## All lines beginning with `## DP:' are a description of the patch.
8
diff -urNad trunk~/modules/ldapbackend/ldapbackend.cc trunk/modules/ldapbackend/ldapbackend.cc
9
--- trunk~/modules/ldapbackend/ldapbackend.cc 2007-04-15 12:05:52.000000000 +0200
10
+++ trunk/modules/ldapbackend/ldapbackend.cc 2008-01-28 21:30:17.444512797 +0100
12
void LdapBackend::lookup_simple( const QType &qtype, const string &qname, DNSPacket *dnspkt, int zoneid )
14
string filter, attr, qesc;
15
- char** attributes = ldap_attrany + 1; // skip associatedDomain
16
- char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL };
17
+ const char** attributes = ldap_attrany + 1; // skip associatedDomain
18
+ const char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL };
21
qesc = toLower( m_pldap->escape( qname ) );
24
attr = qtype.getName() + "Record";
25
filter = "&(" + filter + ")(" + attr + "=*)";
26
- attronly[0] = (char*) attr.c_str();
27
+ attronly[0] = attr.c_str();
28
attributes = attronly;
31
filter = strbind( ":target:", filter, getArg( "filter-lookup" ) );
33
DLOG( L << Logger::Debug << m_myname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl );
34
- m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, (const char**) attributes );
35
+ m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, attributes );
42
string filter, attr, qesc;
43
- char** attributes = ldap_attrany + 1; // skip associatedDomain
44
- char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL };
45
+ const char** attributes = ldap_attrany + 1; // skip associatedDomain
46
+ const char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL };
49
qesc = toLower( m_pldap->escape( qname ) );
52
attr = qtype.getName() + "Record";
53
filter = "&(" + filter + ")(" + attr + "=*)";
54
- attronly[0] = (char*) attr.c_str();
55
+ attronly[0] = attr.c_str();
56
attributes = attronly;
60
filter = strbind( ":target:", filter, getArg( "filter-lookup" ) );
62
DLOG( L << Logger::Debug << m_myname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl );
63
- m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, (const char**) attributes );
64
+ m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, attributes );
69
void LdapBackend::lookup_tree( const QType &qtype, const string &qname, DNSPacket *dnspkt, int zoneid )
71
string filter, attr, qesc, dn;
72
- char** attributes = ldap_attrany + 1; // skip associatedDomain
73
- char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL };
74
+ const char** attributes = ldap_attrany + 1; // skip associatedDomain
75
+ const char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL };
76
vector<string>::reverse_iterator i;
81
attr = qtype.getName() + "Record";
82
filter = "&(" + filter + ")(" + attr + "=*)";
83
- attronly[0] = (char*) attr.c_str();
84
+ attronly[0] = attr.c_str();
85
attributes = attronly;
91
DLOG( L << Logger::Debug << m_myname << " Search = basedn: " << dn + getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl );
92
- m_msgid = m_pldap->search( dn + getArg( "basedn" ), LDAP_SCOPE_BASE, filter, (const char**) attributes );
93
+ m_msgid = m_pldap->search( dn + getArg( "basedn" ), LDAP_SCOPE_BASE, filter, attributes );
101
- char* attronly[] = { "sOARecord", NULL };
102
+ const char* attronly[] = { "sOARecord", NULL };
105
// search for SOARecord of domain
106
filter = "(&(associatedDomain=" + toLower( m_pldap->escape( domain ) ) + ")(SOARecord=*))";
107
- m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, (const char**) attronly );
108
+ m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, attronly );
109
m_pldap->getSearchEntry( m_msgid, m_result );
111
if( m_result.count( "sOARecord" ) && !m_result["sOARecord"].empty() )
112
diff -urNad trunk~/modules/ldapbackend/ldapbackend.hh trunk/modules/ldapbackend/ldapbackend.hh
113
--- trunk~/modules/ldapbackend/ldapbackend.hh 2007-04-15 12:05:49.000000000 +0200
114
+++ trunk/modules/ldapbackend/ldapbackend.hh 2008-01-28 21:30:42.043760027 +0100
119
-static char* ldap_attrany[] = {
120
+static const char* ldap_attrany[] = {
124
diff -urNad trunk~/modules/ldapbackend/powerldap.cc trunk/modules/ldapbackend/powerldap.cc
125
--- trunk~/modules/ldapbackend/powerldap.cc 2006-03-16 21:18:01.000000000 +0100
126
+++ trunk/modules/ldapbackend/powerldap.cc 2008-01-28 21:32:13.809760548 +0100
128
#include "powerldap.hh"
131
+#include <sys/time.h>
134
PowerLDAP::PowerLDAP( const string& hosts, uint16_t port, bool tls )
135
diff -urNad trunk~/pdns/distributor.hh trunk/pdns/distributor.hh
136
--- trunk~/pdns/distributor.hh 2007-04-15 12:04:01.000000000 +0200
137
+++ trunk/pdns/distributor.hh 2008-01-28 21:33:30.553052878 +0100
143
void (*callback)(const AnswerData &);
146
diff -urNad trunk~/pdns/dns.hh trunk/pdns/dns.hh
147
--- trunk~/pdns/dns.hh 2007-04-15 12:04:13.000000000 +0200
148
+++ trunk/pdns/dns.hh 2008-01-28 21:34:18.806691483 +0100
155
ns_t_invalid = 0, /* Cookie. */
156
ns_t_a = 1, /* Host address. */
157
ns_t_ns = 2, /* Authoritative server. */
158
diff -urNad trunk~/pdns/dynmessenger.cc trunk/pdns/dynmessenger.cc
159
--- trunk~/pdns/dynmessenger.cc 2007-04-15 12:02:08.000000000 +0200
160
+++ trunk/pdns/dynmessenger.cc 2008-01-28 21:34:45.775577210 +0100
163
#include "dynmessenger.hh"
169
diff -urNad trunk~/pdns/misc.hh trunk/pdns/misc.hh
170
--- trunk~/pdns/misc.hh 2007-04-15 12:02:45.000000000 +0200
171
+++ trunk/pdns/misc.hh 2008-01-28 21:35:26.121422199 +0100
181
return c==' ' || c=='\t' || c=='\r' || c=='\n';
184
-inline const char dns_tolower(char c)
185
+inline char dns_tolower(char c)
189
diff -urNad trunk~/pdns/pdns_recursor.cc trunk/pdns/pdns_recursor.cc
190
--- trunk~/pdns/pdns_recursor.cc 2007-04-22 10:52:38.000000000 +0200
191
+++ trunk/pdns/pdns_recursor.cc 2008-01-28 21:35:52.676371075 +0100
193
set<DNSResourceRecord>nsset;
195
if(::arg()["hint-file"].empty()) {
196
- static char*ips[]={"198.41.0.4", "192.228.79.201", "192.33.4.12", "128.8.10.90", "192.203.230.10", "192.5.5.241", "192.112.36.4", "128.63.2.53",
197
+ static const char*ips[]={"198.41.0.4", "192.228.79.201", "192.33.4.12", "128.8.10.90", "192.203.230.10", "192.5.5.241", "192.112.36.4", "128.63.2.53",
198
"192.36.148.17","192.58.128.30", "193.0.14.129", "198.32.64.12", "202.12.27.33"};
199
DNSResourceRecord arr, nsrr;