php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rhialto at polderland dot nl
New email:
PHP Version: OS:

 

 [2001-02-13 08:44 UTC] rhialto at polderland dot 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.

Patches

Pull Requests

History

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

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 01:01:28 2024 UTC