]> granicus.if.org Git - php/commitdiff
Fix overbroad skipif include
authorGustavo Lopes <glopes@nebm.ist.utl.pt>
Fri, 1 Feb 2013 10:12:11 +0000 (11:12 +0100)
committerGustavo Lopes <glopes@nebm.ist.utl.pt>
Sat, 2 Feb 2013 13:06:23 +0000 (14:06 +0100)
ext/sockets/tests/ipv6_skipif.inc

index ad8cf77b35746fdb42acb856575c457de2eb3870..1f824630cb89b297b153780d21b7b24d2de77811 100644 (file)
@@ -2,7 +2,5 @@
 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');
+if (@stream_socket_client('udp://[::1]:8888') === false)
+       die('skip no IPv6 support');