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

Add MCL_ONFAULT constant to libc backend #920

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

newpavlov
Copy link
Contributor

The constant was added in libc v0.2.150.

@sunfishcode
Copy link
Member

This can use the bitcast! macro to cast the value to avoid i32/u32 differences, as is now done for the other MCL_* constants.

@newpavlov
Copy link
Contributor Author

Ooops... Missed that, will fix it right away.

@newpavlov
Copy link
Contributor Author

newpavlov commented Nov 7, 2023

Should I add #[cfg(linux_kernel)] on ONFAULT only for the libc backend? I probably should've added this cfg for the raw backend in #872, but adding it now will be, strictly speaking, a breaking change.

@sunfishcode
Copy link
Member

It's not necessary to test for linux_kernel in the linux_raw backend, as linux_raw only supports Linux-kernel platforms.

@sunfishcode sunfishcode merged commit 81d8744 into bytecodealliance:main Nov 7, 2023
43 checks passed
@sunfishcode
Copy link
Member

Thanks!

@newpavlov newpavlov deleted the libc_mcl_onfault branch November 7, 2023 07:32
sunfishcode added a commit that referenced this pull request Nov 7, 2023
As noted in #920, `cfg(linux_kernel` is redundant within
src/backend/linux_raw.
sunfishcode added a commit that referenced this pull request Nov 7, 2023
…922)

As noted in #920, `cfg(linux_kernel` is redundant within
src/backend/linux_raw.
@sunfishcode
Copy link
Member

This is now released in rustix 0.38.22.

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