|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9239 configure tests incorrectly for IPv6
Submitted: 2001-02-13 08:44 UTC Modified: 2001-06-14 15:04 UTC
From: rhialto at polderland dot nl Assigned:
Status: Closed Package: Installation problem
PHP Version: 4.0.4pl1 OS: NetBSD any version
Private report: No CVE-ID: None
 [2001-02-13 08:44 UTC] rhialto at polderland dot nl
From NetBSD problem report pkg/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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-14 15:04 UTC]
Fixed in CVS and in PHP 4.0.6.


PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Jun 02 04:03:38 2023 UTC