1 |
swegener 08/04/29 19:24:45 |
2 |
|
3 |
Added: 2.9.21-gcc-4.3.patch |
4 |
Log: |
5 |
Add patch to fix compilation with gcc-4.3, bug #219693. |
6 |
(Portage version: 2.1.5_rc6) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 net-dns/pdns/files/2.9.21-gcc-4.3.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dns/pdns/files/2.9.21-gcc-4.3.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dns/pdns/files/2.9.21-gcc-4.3.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: 2.9.21-gcc-4.3.patch |
15 |
=================================================================== |
16 |
Fix compilation with gcc-4.3. |
17 |
|
18 |
(modified to not patch Makefile.am) |
19 |
|
20 |
http://bugs.gentoo.org/show_bug.cgi?id=219693 |
21 |
|
22 |
Index: pdns/sstuff.hh |
23 |
=================================================================== |
24 |
--- pdns/sstuff.hh (revision 1093) |
25 |
+++ pdns/sstuff.hh (revision 1094) |
26 |
@@ -189,12 +189,14 @@ |
27 |
struct sockaddr_in remote; |
28 |
socklen_t remlen=sizeof(remote); |
29 |
int bytes; |
30 |
- if((bytes=recvfrom(d_socket, d_buffer, d_buflen, 0, (sockaddr *)&remote, &remlen))<0) |
31 |
- if(errno!=EAGAIN) |
32 |
+ if((bytes=recvfrom(d_socket, d_buffer, d_buflen, 0, (sockaddr *)&remote, &remlen))<0) { |
33 |
+ if(errno!=EAGAIN) { |
34 |
throw NetworkError(strerror(errno)); |
35 |
- else |
36 |
+ } |
37 |
+ else { |
38 |
return false; |
39 |
- |
40 |
+ } |
41 |
+ } |
42 |
dgram.assign(d_buffer,bytes); |
43 |
ep.address.byte=remote.sin_addr.s_addr; |
44 |
ep.port=ntohs(remote.sin_port); |
45 |
Index: pdns/misc.hh |
46 |
=================================================================== |
47 |
--- pdns/misc.hh (revision 1093) |
48 |
+++ pdns/misc.hh (revision 1094) |
49 |
@@ -19,6 +19,7 @@ |
50 |
#ifndef MISC_HH |
51 |
#define MISC_HH |
52 |
#include <stdint.h> |
53 |
+#include <cstring> |
54 |
|
55 |
#if 0 |
56 |
#define RDTSC(qp) \ |
57 |
@@ -234,7 +235,7 @@ |
58 |
return c==' ' || c=='\t' || c=='\r' || c=='\n'; |
59 |
} |
60 |
|
61 |
-inline const char dns_tolower(char c) |
62 |
+inline char dns_tolower(char c) |
63 |
{ |
64 |
if(c>='A' && c<='Z') |
65 |
c+='a'-'A'; |
66 |
Index: pdns/pdns_recursor.cc |
67 |
=================================================================== |
68 |
--- pdns/pdns_recursor.cc (revision 1093) |
69 |
+++ pdns/pdns_recursor.cc (revision 1094) |
70 |
@@ -416,7 +416,7 @@ |
71 |
set<DNSResourceRecord>nsset; |
72 |
|
73 |
if(::arg()["hint-file"].empty()) { |
74 |
- 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", |
75 |
+ 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", |
76 |
"192.36.148.17","192.58.128.30", "193.0.14.129", "198.32.64.12", "202.12.27.33"}; |
77 |
DNSResourceRecord arr, nsrr; |
78 |
arr.qtype=QType::A; |
79 |
Index: pdns/dns.hh |
80 |
=================================================================== |
81 |
--- pdns/dns.hh (revision 1093) |
82 |
+++ pdns/dns.hh (revision 1094) |
83 |
@@ -115,7 +115,7 @@ |
84 |
#pragma pack (pop) |
85 |
#endif |
86 |
|
87 |
-typedef enum { |
88 |
+enum { |
89 |
ns_t_invalid = 0, /* Cookie. */ |
90 |
ns_t_a = 1, /* Host address. */ |
91 |
ns_t_ns = 2, /* Authoritative server. */ |
92 |
@@ -137,7 +137,7 @@ |
93 |
ns_t_afsdb = 18, /* AFS cell database. */ |
94 |
ns_t_x25 = 19, /* X_25 calling address. */ |
95 |
ns_t_isdn = 20, /* ISDN calling address. */ |
96 |
- ns_t_rt = 21, /* Router. */ |
97 |
+ ns_t_rt = 21, /* Router. */ |
98 |
ns_t_nsap = 22, /* NSAP address. */ |
99 |
ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */ |
100 |
ns_t_sig = 24, /* Security signature. */ |
101 |
Index: pdns/resolver.cc |
102 |
=================================================================== |
103 |
--- pdns/resolver.cc (revision 1093) |
104 |
+++ pdns/resolver.cc (revision 1094) |
105 |
@@ -397,12 +397,12 @@ |
106 |
if(mdp->d_header.id != d_randomid) { |
107 |
throw ResolverException("Remote nameserver replied with wrong id"); |
108 |
} |
109 |
- if(mdp->d_header.rcode) |
110 |
+ if(mdp->d_header.rcode) { |
111 |
if(d_inaxfr) |
112 |
throw ResolverException("Remote nameserver unable/unwilling to AXFR with us: RCODE="+itoa(mdp->d_header.rcode)); |
113 |
else |
114 |
throw ResolverException("Remote nameserver reported error: RCODE="+itoa(mdp->d_header.rcode)); |
115 |
- |
116 |
+ } |
117 |
if(!d_inaxfr) { |
118 |
if(mdp->d_header.qdcount!=1) |
119 |
throw ResolverException("resolver: received answer with wrong number of questions ("+itoa(mdp->d_header.qdcount)+")"); |
120 |
Index: pdns/dynmessenger.cc |
121 |
=================================================================== |
122 |
--- pdns/dynmessenger.cc (revision 1093) |
123 |
+++ pdns/dynmessenger.cc (revision 1094) |
124 |
@@ -18,6 +18,7 @@ |
125 |
*/ |
126 |
#include "dynmessenger.hh" |
127 |
#include <cstdio> |
128 |
+#include <cstdlib> |
129 |
#include <cstring> |
130 |
#include <cerrno> |
131 |
#include <iostream> |
132 |
Index: pdns/distributor.hh |
133 |
=================================================================== |
134 |
--- pdns/distributor.hh (revision 1093) |
135 |
+++ pdns/distributor.hh (revision 1094) |
136 |
@@ -82,7 +82,6 @@ |
137 |
struct QuestionData |
138 |
{ |
139 |
Question *Q; |
140 |
- time_t created; |
141 |
void (*callback)(const AnswerData &); |
142 |
int id; |
143 |
}; |
144 |
Index: modules/ldapbackend/powerldap.cc |
145 |
=================================================================== |
146 |
--- modules/ldapbackend/powerldap.cc (revision 1093) |
147 |
+++ modules/ldapbackend/powerldap.cc (revision 1094) |
148 |
@@ -1,7 +1,8 @@ |
149 |
#include "powerldap.hh" |
150 |
+// for timeval |
151 |
+#include <sys/time.h> |
152 |
|
153 |
|
154 |
- |
155 |
PowerLDAP::PowerLDAP( const string& hosts, uint16_t port, bool tls ) |
156 |
{ |
157 |
int protocol = LDAP_VERSION3; |
158 |
|
159 |
|
160 |
|
161 |
-- |
162 |
gentoo-commits@l.g.o mailing list |