Skip to content

Add MCL_ONFAULT constant to libc backend#920

Merged
sunfishcode merged 1 commit into
bytecodealliance:mainfrom
newpavlov:libc_mcl_onfault
Nov 7, 2023
Merged

Add MCL_ONFAULT constant to libc backend#920
sunfishcode merged 1 commit into
bytecodealliance:mainfrom
newpavlov:libc_mcl_onfault

Conversation

@newpavlov

Copy link
Copy Markdown
Contributor

The constant was added in libc v0.2.150.

@sunfishcode

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@newpavlov

newpavlov commented Nov 7, 2023

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
@sunfishcode

Copy link
Copy Markdown
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
Copy Markdown
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