Skip to content

Commit ec04bc5

Browse files
committed
changes for windows
1 parent 47a299a commit ec04bc5

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

ext/sockets/sockets.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,14 +1647,14 @@
16471647
*/
16481648
const SOL_UDPLITE = UNKNOWN;
16491649
#endif
1650-
#ifdef IPPROTO_ICMP
1650+
#if defined(IPPROTO_ICMP) || defined(PHP_WIN32)
16511651
/**
16521652
* @var int
16531653
* @cvalue IPPROTO_ICMP
16541654
*/
16551655
const IPPROTO_ICMP = UNKNOWN;
16561656
#endif
1657-
#ifdef IPPROTO_ICMPV6
1657+
#if defined(IPPROTO_ICMPV6) || defined(PHP_WIN32)
16581658
/**
16591659
* @var int
16601660
* @cvalue IPPROTO_ICMPV6

ext/sockets/sockets_arginfo.h

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/sockets/tests/socket_icmp.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sockets
66
<?php
77
if (!defined("IPPROTO_ICMP")) die("skip IPPROTO_ICMP not available");
88
// IPPROTO_ICMP* functions with raw sockets, thus requiring administrative role.
9-
if (!function_exists("posix_getuid") || posix_getuid() != 0) die('skip IPPROTO_ICMP requires root permissions.');
9+
if (PHP_OS_FAMILY !== "Windows" && (!function_exists("posix_getuid") || posix_getuid() != 0)) die('skip IPPROTO_ICMP requires root permissions.');
1010
?>
1111
--FILE--
1212
<?php

0 commit comments

Comments
 (0)