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

MapFlags netbsd/freebsd constant additions. #2090

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devnexen
Copy link
Contributor

@devnexen devnexen commented Aug 7, 2023

Related to page alignment, adding map_aligned for custom alignment requirements.

@devnexen devnexen force-pushed the mmap_update_bsd branch 2 times, most recently from 8713927 to 204de8d Compare August 7, 2023 15:06
src/sys/mman.rs Outdated
#[cfg_attr(docsrs, doc(cfg(all())))]
MAP_ALIGNMENT_64PB;
/// Right operand value for the page alignment bitshift calculation
/// FIXME: not present in libc for FreeBSD
Copy link
Member

Choose a reason for hiding this comment

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

Why don't you go ahead and add defines for these on FreeBSD (and maybe other places) in libc before merging this PR into Nix?

Copy link
Member

Choose a reason for hiding this comment

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

These 2 constants have been added in libc#3326

@@ -184,6 +184,40 @@ libc_bitflags! {
#[cfg(target_os = "openbsd")]
#[cfg_attr(docsrs, doc(cfg(all())))]
MAP_CONCEAL;
/// Pages aligned on 64kb
#[cfg(target_os = "netbsd")]
#[cfg_attr(docsrs, doc(cfg(all())))]
Copy link
Member

Choose a reason for hiding this comment

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

Please rebase and remove the #[cfg_attr(docsrs, doc(cfg(all())))] attributes from all the variants as we have removed them all from the codebase (#2192)

src/sys/mman.rs Outdated
#[cfg_attr(docsrs, doc(cfg(all())))]
MAP_ALIGNMENT_64PB;
/// Right operand value for the page alignment bitshift calculation
/// FIXME: not present in libc for FreeBSD
Copy link
Member

Choose a reason for hiding this comment

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

These 2 constants have been added in libc#3326

Related to page alignment, adding map_aligned for custom alignment
requirements.
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.

None yet

3 participants