You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #2367 - rtzoeller:unused_in_dfly, r=JohnTitor
Clarify that MAP_RENAME and MAP_NORESERVE are deprecated in DragonFlyBSD
MAP_RENAME and MAP_NORESERVE are marked as deprecated for freebsdlike, but the note only mentions FreeBSD. Clarify the status of these constants on DragonFlyBSD.
From the EFnet #dragonflybsd channel:
```
<rtzoeller> Hi all, I've got a question about how some DragonFlyBSD #define's are being reflected in Rust's libc, and what the expected behavior should be.
<rtzoeller> Rust's libc has marked MAP_RENAME and MAP_NORESERVE as deprecated/removed for both FreeBSD and DragonFlyBSD, perhaps erroneously. https://github.com/rust-lang/libc/blob/2cffe84529fb86a150c6848409d75aa96d237944/src/unix/bsd/freebsdlike/mod.rs#L990
<rtzoeller> DragonFlyBSD hasn't removed these, so ostensibly the answer is to just mark them as not deprecated in Rust's libc.
<rtzoeller> At the same time, I can't find any usage of them in the rest of the DragonFlyBSD kernel... so maybe they are deprecated in practice, but not officially?
<rtzoeller> Ultimately the question is: should Rust's libc advertise MAP_RENAME and MAP_NORESERVE for DragonFlyBSD, or should it mark them as deprecated like it does for FreeBSD?
<rtzoeller> DragonFlyBSD's definition of them: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/c163a4d7ee9c6857ee4e04a3a2cbb50c3de29da1/sys/sys/mman.h#L86
<swildner`> rtzoeller: git log -S shows that we only inherited the defines from freebsd but never implemented them either, so they can be marked deprecated for dfly too
```
The existing note has evidently caused some confusion, as the nix crate excludes these constants for FreeBSD but not for DragonFlyBSD.
0 commit comments