mirror of
https://github.com/php/php-src.git
synced 2026-04-21 23:18:13 +02:00
7485978339
This is an automated migration of most SKIPIF extension_loaded checks.
24 lines
531 B
PHP
24 lines
531 B
PHP
--TEST--
|
|
Bug #51958: socket_accept() fails on IPv6 server sockets
|
|
--EXTENSIONS--
|
|
sockets
|
|
--SKIPIF--
|
|
<?php
|
|
|
|
if (!defined('IPPROTO_IPV6')) {
|
|
die('skip IPv6 not available.');
|
|
}
|
|
if (PHP_OS != "WINNT")
|
|
die('skip test relies Winsock\'s error code for WSAEWOULDBLOCK/EAGAIN');
|
|
--FILE--
|
|
<?php
|
|
$listenfd = socket_create(AF_INET6, SOCK_STREAM, SOL_TCP);
|
|
socket_bind($listenfd, "::1", 13579);
|
|
socket_listen($listenfd);
|
|
socket_set_nonblock($listenfd);
|
|
$connfd = @socket_accept($listenfd);
|
|
echo socket_last_error();
|
|
?>
|
|
--EXPECT--
|
|
10035
|