~ubuntu-branches/ubuntu/maverick/pdns/maverick-updates

« back to all changes in this revision

Viewing changes to debian/patches/gcc43-fixes.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Matthijs Mohlmann
  • Date: 2008-02-03 20:57:51 UTC
  • Revision ID: james.westby@ubuntu.com-20080203205751-53bsaify8o200mxh
Tags: 2.9.21-5
* Fix ignoring buid errors. (Closes: #462858)
* Patch from Steve to fix build with OpenLDAP 2.4. (Closes: #462966)
  - Changed patch a bit to convert host, port and tls option to a ldapuri.
* Update Standards-Version to 3.7.3.
* Added gcc 4.3 fixes (Closes: #456073)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## gcc43-fixes.dpatch by Matthijs Mohlmann <matthijs@cacholong.nl>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: No description.
 
6
 
 
7
@DPATCH@
 
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
 
11
@@ -194,8 +194,8 @@
 
12
 void LdapBackend::lookup_simple( const QType &qtype, const string &qname, DNSPacket *dnspkt, int zoneid )
 
13
 {
 
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 };
 
19
 
 
20
 
 
21
        qesc = toLower( m_pldap->escape( qname ) );
 
22
@@ -205,14 +205,14 @@
 
23
        {
 
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;
 
29
        }
 
30
 
 
31
        filter = strbind( ":target:", filter, getArg( "filter-lookup" ) );
 
32
 
 
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 );
 
36
 }
 
37
 
 
38
 
 
39
@@ -222,8 +222,8 @@
 
40
        int len;
 
41
        vector<string> parts;
 
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 };
 
47
 
 
48
 
 
49
        qesc = toLower( m_pldap->escape( qname ) );
 
50
@@ -249,7 +249,7 @@
 
51
                {
 
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;
 
57
                }
 
58
        }
 
59
@@ -257,7 +257,7 @@
 
60
        filter = strbind( ":target:", filter, getArg( "filter-lookup" ) );
 
61
 
 
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 );
 
65
 }
 
66
 
 
67
 
 
68
@@ -265,8 +265,8 @@
 
69
 void LdapBackend::lookup_tree( const QType &qtype, const string &qname, DNSPacket *dnspkt, int zoneid )
 
70
 {
 
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;
 
77
        vector<string> parts;
 
78
 
 
79
@@ -278,7 +278,7 @@
 
80
        {
 
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;
 
86
        }
 
87
 
 
88
@@ -291,7 +291,7 @@
 
89
        }
 
90
 
 
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 );
 
94
 }
 
95
 
 
96
 
 
97
@@ -487,12 +487,12 @@
 
98
 {
 
99
        string filter;
 
100
        SOAData sd;
 
101
-       char* attronly[] = { "sOARecord", NULL };
 
102
+       const char* attronly[] = { "sOARecord", NULL };
 
103
 
 
104
 
 
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 );
 
110
 
 
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
 
115
@@ -54,7 +54,7 @@
 
116
 
 
117
 
 
118
 
 
119
-static char* ldap_attrany[] = {
 
120
+static const char* ldap_attrany[] = {
 
121
        "associatedDomain",
 
122
        "dNSTTL",
 
123
        "aRecord",
 
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
 
127
@@ -1,5 +1,6 @@
 
128
 #include "powerldap.hh"
 
129
-
 
130
+// for timeval
 
131
+#include <sys/time.h>
 
132
 
 
133
 
 
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
 
138
@@ -82,7 +82,6 @@
 
139
   struct QuestionData
 
140
   {
 
141
     Question *Q;
 
142
-    time_t created;
 
143
     void (*callback)(const AnswerData &);
 
144
     int id;
 
145
   };
 
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
 
149
@@ -115,7 +115,7 @@
 
150
 #pragma pack (pop)
 
151
 #endif 
 
152
 
 
153
-typedef enum  {
 
154
+enum  {
 
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
 
161
@@ -18,6 +18,7 @@
 
162
 */
 
163
 #include "dynmessenger.hh"
 
164
 #include <cstdio>
 
165
+#include <cstdlib>
 
166
 #include <cstring>
 
167
 #include <cerrno>
 
168
 #include <iostream>
 
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
 
172
@@ -19,6 +19,7 @@
 
173
 #ifndef MISC_HH
 
174
 #define MISC_HH
 
175
 #include <stdint.h>
 
176
+#include <cstring>
 
177
 
 
178
 #if 0
 
179
 #define RDTSC(qp) \
 
180
@@ -234,7 +235,7 @@
 
181
   return c==' ' || c=='\t' || c=='\r' || c=='\n';
 
182
 }
 
183
 
 
184
-inline const char dns_tolower(char c)
 
185
+inline char dns_tolower(char c)
 
186
 {
 
187
   if(c>='A' && c<='Z')
 
188
     c+='a'-'A';
 
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
 
192
@@ -412,7 +412,7 @@
 
193
   set<DNSResourceRecord>nsset;
 
194
 
 
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;
 
200
     arr.qtype=QType::A;