#30057 [Opn]: IPv6 support broken
| From: | neon at neon-line dot net | Date: | Sat, 25 Sep 2004 11:14:22 +0000 |
| Subject: | #30057 [Opn]: IPv6 support broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-66673@lists.php.net to get a copy of this message | ||
ID: 30057
User updated by: neon at neon-line dot net
Reported By: neon at neon-line dot net
Status: Open
Bug Type: Sockets related
Operating System: FreeBSD 4.10
PHP Version: 5.0.1
New Comment:
I'm just curious that has this issue been completely forgotten or
abandoned?
Previous Comments:
------------------------------------------------------------------------
[2004-09-17 18:02:22] neon at neon-line dot net
Current problem:
configure:16413: checking for getaddrinfo
configure:16425: gcc -o conftest -g -O2 conftest.c -lm 1>&5
configure:16471: gcc -o conftest -g -O2 conftest.c -lm 1>&5
configure: In function `main':
configure:16444: `NULL' undeclared (first use in this function)
configure:16444: (Each undeclared identifier is reported only once
configure:16444: for each function it appears in.)
configure: failed program was:
#line 16431 "configure"
My suggestion to fix this is:
--- configure.in.old Fri Sep 17 17:30:10 2004
+++ configure.in Fri Sep 17 18:58:02 2004
@@ -569,6 +569,9 @@
AC_TRY_RUN([
#include <netdb.h>
#include <sys/types.h>
+#ifndef NULL
+# define NULL (void *)0
+#endif
#ifndef AF_INET
# include <sys/socket.h>
#endif
Which will fix the problem at least on those machines that I've tested.
------------------------------------------------------------------------
[2004-09-17 17:47:11] wez@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Please test the next unstable (5.1/HEAD) snapshot to see if things work
out ok there; we can then backport the fix.
------------------------------------------------------------------------
[2004-09-12 11:33:07] neon at neon-line dot net
Sorry, my typo. sys/socket.h is indeed the correct one.
On FreeBSD it works, but will it break on some other OS(s)?
------------------------------------------------------------------------
[2004-09-12 11:27:24] wez@php.net
<sys/sockets.h> or <sys/socket.h> ? (I'd expect the latter to be
correct)
It sounds like we need to add that header to our configure check to
make it work (and also make IPV6 depend on its presence)
------------------------------------------------------------------------
[2004-09-12 09:10:59] neon at neon-line dot net
wez:
I had to add stdlib.h and sys/sockets.h headers to compile it because
NULL is defined in stdlib.h (weird) and constant AF_INET in
sys/socket.h.
After those modifications output was "OK!" (as expected).
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/30057
--
Edit this bug report at http://bugs.php.net/?id=30057&edit=1