Skip to content
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

Support Socket::{join_multicast_v4_n, leave_multicast_v4_n} on OpenBSD #292

Open
Thomasdezeeuw opened this issue Jan 28, 2022 · 7 comments

Comments

@Thomasdezeeuw
Copy link
Collaborator

Effectively reverting #291. Requires ip_mreqn to be added to libc.

@niklasha
Copy link
Contributor

I just checked and a recent commit: rust-lang/libc@2cfa3e9 seems to have added it. Maybe it's just a case of waiting for a new release?

@Thomasdezeeuw
Copy link
Collaborator Author

I just checked and a recent commit: rust-lang/libc@2cfa3e9 seems to have added it. Maybe it's just a case of waiting for a new release?

@niklasha It seems that comment is already in v0.2.114 based on the git tags, if you have an OpenBSD install handy could you check that socket2 works with libc v0.2.114?

@robwahl
Copy link

robwahl commented Sep 10, 2022

Hello, my name is Robert Wahlstedt and I would like to help with this issue

@Thomasdezeeuw
Copy link
Collaborator Author

Hello, my name is Robert Wahlstedt and I would like to help with this issue

Great! I tried to keep everything working on OpenBSD, but the OpenBSD target not being distributed via rustup makes it a lot harder.

I think the easiest place to start is get the tests running and passing on OpenBSD. This means you'll likely have to add a bunch of cfg such as the following to the code:

socket2/src/lib.rs

Lines 387 to 397 in 4c43681

#[cfg_attr(target_os = "openbsd", allow(dead_code))]
time: Option<Duration>,
#[cfg(not(any(target_os = "openbsd", target_os = "redox", target_os = "solaris")))]
interval: Option<Duration>,
#[cfg(not(any(
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
target_os = "windows"
)))]
retries: Option<u32>,

@robwahl
Copy link

robwahl commented Sep 10, 2022

Great, I'd get started on it

@niklasha
Copy link
Contributor

All configured tests run already, but perhaps you were referring only to

fn join_leave_multicast_v4_n() {
?

@niklasha
Copy link
Contributor

and @Thomasdezeeuw I am sorry, I forgot all about your request from January 29, but I'll gladly let @robwahl do this deed instead :-)

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

No branches or pull requests

3 participants