diff --git a/NEWS b/NEWS index e769b356a60..8fb38102686 100644 --- a/NEWS +++ b/NEWS @@ -247,7 +247,9 @@ PHP NEWS - Sockets: . Fixed bug #62025 (__ss_family was changed on AIX 5.3). (Felipe) - + . Fixed bug #63000 (MCAST_JOIN_GROUP on OSX is broken, merge of PR 185 by + Igor Wiedler). (Lars) + - SPL: . Fixed bug #62433 (Inconsistent behavior of RecursiveDirectoryIterator to dot files). (Laruence) diff --git a/ext/sockets/multicast.h b/ext/sockets/multicast.h index ccd9b1d2a8e..5619c9c7fb2 100644 --- a/ext/sockets/multicast.h +++ b/ext/sockets/multicast.h @@ -19,11 +19,12 @@ /* $Id$ */ #if defined(MCAST_JOIN_GROUP) && \ - (!defined(PHP_WIN32) || (_WIN32_WINNT >= 0x600 && SOCKETS_ENABLE_VISTA_API)) + (!defined(PHP_WIN32) || (_WIN32_WINNT >= 0x600 && SOCKETS_ENABLE_VISTA_API)) && \ + !defined(__APPLE__) #define RFC3678_API 1 /* has block/unblock and source membership, in this case for both IPv4 and IPv6 */ #define HAS_MCAST_EXT 1 -#elif defined(IP_ADD_SOURCE_MEMBERSHIP) +#elif defined(IP_ADD_SOURCE_MEMBERSHIP) && !defined(__APPLE__) /* has block/unblock and source membership, but only for IPv4 */ #define HAS_MCAST_EXT 1 #endif diff --git a/ext/sockets/tests/bug63000.phpt b/ext/sockets/tests/bug63000.phpt new file mode 100644 index 00000000000..c806ba4c087 --- /dev/null +++ b/ext/sockets/tests/bug63000.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #63000: Multicast on OSX +--SKIPIF-- + '224.0.0.251', + "interface" => 0, +)); +var_dump($so); +--EXPECTF-- +bool(true)