Update bind to 9.5.0 p1 (#3744)
[openwrt/svn-archive/archive.git] / net / bind / patches / 100-cross_compile.patch
1 Index: bind-9.5.0-P1/configure
2 ===================================================================
3 --- bind-9.5.0-P1.orig/configure 2008-05-06 02:33:33.000000000 +0100
4 +++ bind-9.5.0-P1/configure 2008-07-12 08:23:25.000000000 +0100
5 @@ -6369,8 +6369,7 @@
6 else
7 test "$cross_compiling" = yes &&
8 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
9 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
10 - { (exit 1); exit 1; }; }
11 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} }
12 if test -r "$devrandom"; then
13 eval "$as_ac_File=yes"
14 else
15 @@ -25119,195 +25118,6 @@
16 # which provides some (all?) of the desired functions.
17 #
18
19 -{ echo "$as_me:$LINENO: checking for inet_ntop with IPv6 support" >&5
20 -echo $ECHO_N "checking for inet_ntop with IPv6 support... $ECHO_C" >&6; }
21 -if test "$cross_compiling" = yes; then
22 - { echo "$as_me:$LINENO: result: assuming inet_ntop needed" >&5
23 -echo "${ECHO_T}assuming inet_ntop needed" >&6; }
24 - ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
25 - ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
26 - ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"
27 -else
28 - cat >conftest.$ac_ext <<_ACEOF
29 -/* confdefs.h. */
30 -_ACEOF
31 -cat confdefs.h >>conftest.$ac_ext
32 -cat >>conftest.$ac_ext <<_ACEOF
33 -/* end confdefs.h. */
34 -
35 -#include <sys/types.h>
36 -#include <sys/socket.h>
37 -#include <netinet/in.h>
38 -#include <arpa/inet.h>
39 -main() {
40 -char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}
41 -_ACEOF
42 -rm -f conftest$ac_exeext
43 -if { (ac_try="$ac_link"
44 -case "(($ac_try" in
45 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
46 - *) ac_try_echo=$ac_try;;
47 -esac
48 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
49 - (eval "$ac_link") 2>&5
50 - ac_status=$?
51 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
52 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
53 - { (case "(($ac_try" in
54 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
55 - *) ac_try_echo=$ac_try;;
56 -esac
57 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
58 - (eval "$ac_try") 2>&5
59 - ac_status=$?
60 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
61 - (exit $ac_status); }; }; then
62 - { echo "$as_me:$LINENO: result: yes" >&5
63 -echo "${ECHO_T}yes" >&6; }
64 - ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"
65 -else
66 - echo "$as_me: program exited with status $ac_status" >&5
67 -echo "$as_me: failed program was:" >&5
68 -sed 's/^/| /' conftest.$ac_ext >&5
69 -
70 -( exit $ac_status )
71 -{ echo "$as_me:$LINENO: result: no" >&5
72 -echo "${ECHO_T}no" >&6; }
73 - ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
74 - ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
75 - ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"
76 -fi
77 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
78 -fi
79 -
80 -
81 -
82 -
83 -# On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
84 -# addresses with less than four octets, like "1.2.3". Also leading
85 -# zeros should also be rejected.
86 -
87 -{ echo "$as_me:$LINENO: checking for working inet_pton with IPv6 support" >&5
88 -echo $ECHO_N "checking for working inet_pton with IPv6 support... $ECHO_C" >&6; }
89 -if test "$cross_compiling" = yes; then
90 - { echo "$as_me:$LINENO: result: assuming target platform has working inet_pton" >&5
91 -echo "${ECHO_T}assuming target platform has working inet_pton" >&6; }
92 - ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"
93 -else
94 - cat >conftest.$ac_ext <<_ACEOF
95 -/* confdefs.h. */
96 -_ACEOF
97 -cat confdefs.h >>conftest.$ac_ext
98 -cat >>conftest.$ac_ext <<_ACEOF
99 -/* end confdefs.h. */
100 -
101 -#include <sys/types.h>
102 -#include <sys/socket.h>
103 -#include <netinet/in.h>
104 -#include <arpa/inet.h>
105 -main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
106 - inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 :
107 - (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }
108 -_ACEOF
109 -rm -f conftest$ac_exeext
110 -if { (ac_try="$ac_link"
111 -case "(($ac_try" in
112 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
113 - *) ac_try_echo=$ac_try;;
114 -esac
115 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
116 - (eval "$ac_link") 2>&5
117 - ac_status=$?
118 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
119 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
120 - { (case "(($ac_try" in
121 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
122 - *) ac_try_echo=$ac_try;;
123 -esac
124 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
125 - (eval "$ac_try") 2>&5
126 - ac_status=$?
127 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
128 - (exit $ac_status); }; }; then
129 - { echo "$as_me:$LINENO: result: yes" >&5
130 -echo "${ECHO_T}yes" >&6; }
131 - ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"
132 -else
133 - echo "$as_me: program exited with status $ac_status" >&5
134 -echo "$as_me: failed program was:" >&5
135 -sed 's/^/| /' conftest.$ac_ext >&5
136 -
137 -( exit $ac_status )
138 -{ echo "$as_me:$LINENO: result: no" >&5
139 -echo "${ECHO_T}no" >&6; }
140 - ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
141 - ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
142 - ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"
143 -fi
144 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
145 -fi
146 -
147 -
148 -
149 -{ echo "$as_me:$LINENO: checking for inet_aton" >&5
150 -echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
151 -cat >conftest.$ac_ext <<_ACEOF
152 -/* confdefs.h. */
153 -_ACEOF
154 -cat confdefs.h >>conftest.$ac_ext
155 -cat >>conftest.$ac_ext <<_ACEOF
156 -/* end confdefs.h. */
157 -
158 -#include <sys/types.h>
159 -#include <netinet/in.h>
160 -#include <arpa/inet.h>
161 -int
162 -main ()
163 -{
164 -struct in_addr in; inet_aton(0, &in); return (0);
165 - ;
166 - return 0;
167 -}
168 -_ACEOF
169 -rm -f conftest.$ac_objext conftest$ac_exeext
170 -if { (ac_try="$ac_link"
171 -case "(($ac_try" in
172 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
173 - *) ac_try_echo=$ac_try;;
174 -esac
175 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
176 - (eval "$ac_link") 2>conftest.er1
177 - ac_status=$?
178 - grep -v '^ *+' conftest.er1 >conftest.err
179 - rm -f conftest.er1
180 - cat conftest.err >&5
181 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
182 - (exit $ac_status); } && {
183 - test -z "$ac_c_werror_flag" ||
184 - test ! -s conftest.err
185 - } && test -s conftest$ac_exeext &&
186 - $as_test_x conftest$ac_exeext; then
187 - { echo "$as_me:$LINENO: result: yes" >&5
188 -echo "${ECHO_T}yes" >&6; }
189 - ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON"
190 -else
191 - echo "$as_me: failed program was:" >&5
192 -sed 's/^/| /' conftest.$ac_ext >&5
193 -
194 - { echo "$as_me:$LINENO: result: no" >&5
195 -echo "${ECHO_T}no" >&6; }
196 - ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
197 - ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c"
198 - ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1"
199 -fi
200 -
201 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
202 - conftest$ac_exeext conftest.$ac_ext
203 -
204 -
205 -
206 -
207 -
208 #
209 # Look for a 4.4BSD-style sa_len member in struct sockaddr.
210 #
211 Index: bind-9.5.0-P1/lib/bind/configure
212 ===================================================================
213 --- bind-9.5.0-P1.orig/lib/bind/configure 2008-04-29 00:51:46.000000000 +0100
214 +++ bind-9.5.0-P1/lib/bind/configure 2008-06-08 15:16:17.000000000 +0100
215 @@ -5292,6 +5292,7 @@
216 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
217 echo $ECHO_N "(cached) $ECHO_C" >&6
218 else
219 +cross_compiling=no
220 test "$cross_compiling" = yes &&
221 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
222 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}