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

Enable a few features on more platforms. #1203

Merged
merged 2 commits into from
Nov 4, 2024
Merged

Conversation

sunfishcode
Copy link
Member

Define PollFlags::RDHUP on FreeBSD, AT_EACCESS on Emscripten, and ptsname on Illumos.

Define `PollFlags::RDHUP` on FreeBSD, `AT_EACCESS` on Emscripten,
and `ptsname` on Illumos.
@sunfishcode sunfishcode merged commit 5e5360a into main Nov 4, 2024
45 checks passed
@sunfishcode sunfishcode deleted the sunfishcode/libc-update branch November 4, 2024 22:43
sunfishcode added a commit that referenced this pull request Nov 4, 2024
* Enable a few features on more platforms.

Define `PollFlags::RDHUP` on FreeBSD, `AT_EACCESS` on Emscripten,
and `ptsname` on Illumos.

* Enable `epoll` on solarish.
sunfishcode added a commit that referenced this pull request Nov 4, 2024
* Enable a few features on more platforms.

Define `PollFlags::RDHUP` on FreeBSD, `AT_EACCESS` on Emscripten,
and `ptsname` on Illumos.

* Enable `epoll` on solarish.
@@ -5,5 +5,5 @@ pub(crate) mod types;
#[cfg_attr(windows, path = "windows_syscalls.rs")]
pub(crate) mod syscalls;

#[cfg(any(linux_kernel, target_os = "redox"))]
#[cfg(any(linux_kernel, solarish, target_os = "redox"))]
Copy link
Contributor

Choose a reason for hiding this comment

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

epoll is supported in illumos, but is it also supported in solaris? (I could not find the man page.)
https://illumos.org/man/7/epoll

Also, libc defines epoll-related stuff for solarish only in illumos.rs, so doesn't this actually cause a compile error in solaris?
https://github.com/search?q=repo%3Arust-lang%2Flibc+%2Fepoll_%2F+path%3Asrc%2Funix%2Fsolarish&type=code

Copy link
Member Author

Choose a reason for hiding this comment

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

It does compile with the current libc crate. It appears the code you linked to here is only one day old and has not made it to a release yet. I've now filed #1208 to disable epoll support on Solaris in rustix.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the link and PR. The comment in in src/unix/solarish/mod.rs removed in the libc PR says:

    // The epoll functions are actually only present on illumos.  However,
    // there are things using epoll on illumos (built using the
    // x86_64-pc-solaris target) which would break until the illumos target is
    // present in rustc.

It appears to be what was used before illumos was added as its own target.

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.

2 participants