[Phenomena]
Python's configure script fails at getaddrinfo() check
on KAME-SNAP-freebsd4-20040412, although it supports
getaddrinfo() properly.
configure:14128: checking getaddrinfo bug
configure:14230: cc -o conftest -O -pipe
-D_THREAD_SAFE -DTHREAD_STACK_SIZE=0x20000 -pthread
conftest.c -L/usr/local/v6/lib -linet6 -lutil >&5
configure:14233: $? = 0
configure:14235: ./conftest
configure:14238: $? = 1
configure: program exited with status 1
configure: failed program was:
...
[reason]
The testing program to verify getaddrinfo() in
configure script assumes that there is only one
SOCK_STREAM protocol (normally TCP).
Since KAME supports SCTP as well as TCP, this
assumption is not true; getaddrinfo() returns two
protocols for the same socket type, which lead to a
unexpected result in this testing program.
[Solution]
Just specify the protocol in the testing program (like
the following patch) so that new protocol support
should not lead to such configure failure.
hints.ai_family = AF_UNSPEC;
hints.ai_flags = passive ? AI_PASSIVE : 0;
hints.ai_socktype = SOCK_STREAM;
+ hints.ai_protocol = IPPROTO_TCP;
if ((gaierr = getaddrinfo(NULL, "54321", &hints,
&aitop)) != 0) {
(void)gai_strerror(gaierr);
goto bad;
|