From:             [EMAIL PROTECTED]
Operating system: NetBSD any version
PHP version:      4.0.4pl1
PHP Bug Type:     *Install and Config
Bug description:  configure tests incorrectly for IPv6

>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.


-- 
Edit Bug report at: http://bugs.php.net/?id=9239&edit=1



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to