MFH: Fix skipif

This commit is contained in:
Arnaud Le Blanc 2009-05-20 09:13:29 +00:00
parent 73553e8c77
commit 808acd6b64
3 changed files with 10 additions and 3 deletions

View File

@ -0,0 +1,8 @@
<?php
if (!defined("AF_INET6")) {
die('skip no IPv6 support');
}
/* If IPv6 is supported on the platform this will error out with code 111 - Connection refused.
If IPv6 is NOT supported, $errno will be set to something else (indicating parse/getaddrinfo error) */
@stream_socket_client('tcp://[::1]:0', $errno);
if ($errno != 111) die('skip no IPv6 support');

View File

@ -5,9 +5,7 @@ IPv6 Loopback test
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}
if (!defined("AF_INET6")) {
die('skip no IPv6 support');
}
require 'ipv6_skipif.inc';
?>
--FILE--
<?php

View File

@ -5,6 +5,7 @@ Test if socket_recvfrom() receives data sent by socket_sendto() via IPv6 UDP
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
}
require 'ipv6_skipif.inc';
--FILE--
<?php
$socket = socket_create(AF_INET6, SOCK_DGRAM, SOL_UDP);