Skip to content

Bug #63000: MCAST_JOIN_GROUP on OSX is broken #185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

igorw
Copy link
Contributor

@igorw igorw commented Sep 2, 2012

Ticket: https://bugs.php.net/63000

The multicast support in PHP 5.4 makes use of MCAST_JOIN_GROUP if it is present.
The problem is that OSX 10.7 added the constant, but did not correctly implement
the feature. This causes the setsockopt call to fail.

The solution to the problem is to not use MCAST_JOIN_GROUP on OSX.

For reference, this was also done in VLC:

The multicast support in PHP 5.4 makes use of MCAST_JOIN_GROUP if it is present.
The problem is that OSX 10.7 added the constant, but did not correctly implement
the feature. This causes the setsockopt call to fail.

The solution to the problem is to not use MCAST_JOIN_GROUP on OSX.

For reference, this was also done in VLC:

* http://trac.videolan.org/vlc/ticket/6104#comment:19
@travisbot
Copy link

This pull request fails (merged ba0a1c6 into a26390e).

#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 */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi igorw,
did you try 10.8 is that still broken in 10.8?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, also returns EINVAL in 10.8.

@lstrojny
Copy link
Contributor

Thanks for the fix. Could you add a test verifying it is not enabled on Darwin. Additionally we need to add a warning to the documentation that this feature is not available on Darwin.

@lstrojny
Copy link
Contributor

Oversaw the test. Merging now.

@php-pulls
Copy link

Comment on behalf of lstrojny at php.net:

Merged into 5.4 and master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants