Bug #9239 Updated: configure tests incorrectly for IPv6
| From: | sniper@php.net | Date: | Thu, 14 Jun 2001 19:04:17 +0000 |
| Subject: | Bug #9239 Updated: configure tests incorrectly for IPv6 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-56733@lists.php.net to get a copy of this message | ||
ID: 9239
Updated by: sniper
Reported By: rhialto@polderland.nl
Old-Status: Open
Status: Closed
Bug Type: *Install and Config
Operating system:
PHP Version: 4.0.4pl1
Assigned To:
Comments:
Fixed in CVS and in PHP 4.0.6.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2001-02-13 08:44:58] rhialto@polderland.nl
From NetBSD problem report pkg/12199: http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=12199
Configure uses an incorrect test program to check for availability of IPv6. I noticed this for the
php4 package but I'm sure it is a more general configure problem.
This is the code that is used:
#line 6338 "configure"
#include "confdefs.h"
#include <sys/socket.h>
#include <netinet/in.h>
int main() {
struct sockaddr_in6 s; int i=AF_INET6; s
; return 0; }
What is missing is an #include <sys/types.h>. The compilation fails with messages like
configure:6333: checking for IPv6 support
configure:6346: cc -c -O2 -I/usr/pkg/include -I/usr/pkg/include conftest.c 1>&5
In file included from configure:6339:
/usr/include/sys/socket.h:186: syntax error before `u_char'
/usr/include/sys/socket.h:214: syntax error before `u_char'
/usr/include/sys/socket.h:216: `int64_t' undeclared here (not in a function)
/usr/include/sys/socket.h:216: `u_char' undeclared here (not in a function)
/usr/include/sys/socket.h:217: syntax error before `int64_t'
and more.
This is independent of actual support of IPv6.
You need to add #include <sys/types.h>, as always is needed before <sys/socket.h>. See
the man page for socket(2), for instance.
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9239&edit=2