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 missing musl utmpx.h constants #3908

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions libc-test/semver/linux-musl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,39 @@ AF_XDP
AIO_ALLDONE
AIO_CANCELED
AIO_NOTCANCELED
BOOT_TIME
DEAD_PROCESS
Elf32_Chdr
Elf64_Chdr
EMPTY
INIT_PROCESS
LIO_NOP
LIO_NOWAIT
LIO_READ
LIO_WAIT
LIO_WRITE
LOGIN_PROCESS
MPOL_BIND
MPOL_DEFAULT
MPOL_INTERLEAVE
MPOL_LOCAL
MPOL_PREFERRED
NEW_TIME
OLD_TIME
PF_IB
PF_MPLS
PF_XDP
PIDFD_NONBLOCK
PR_SET_VMA
PR_SET_VMA_ANON_NAME
RUN_LVL
RWF_APPEND
RWF_DSYNC
RWF_HIPRI
RWF_NOWAIT
RWF_SYNC
SOL_XDP
USER_PROCESS
XDP_COPY
XDP_MMAP_OFFSETS
XDP_OPTIONS
Expand Down
12 changes: 12 additions & 0 deletions src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,18 @@ pub const MAP_HUGE_16GB: ::c_int = 34 << MAP_HUGE_SHIFT;

pub const MS_RMT_MASK: ::c_ulong = 0x02800051;

// include/utmpx.h
pub const EMPTY: ::c_short = 0;
pub const RUN_LVL: ::c_short = 1;
pub const BOOT_TIME: ::c_short = 2;
pub const NEW_TIME: ::c_short = 3;
pub const OLD_TIME: ::c_short = 4;
pub const INIT_PROCESS: ::c_short = 5;
pub const LOGIN_PROCESS: ::c_short = 6;
pub const USER_PROCESS: ::c_short = 7;
pub const DEAD_PROCESS: ::c_short = 8;
// musl does not define ACCOUNTING

pub const SFD_CLOEXEC: ::c_int = 0x080000;

pub const NCCS: usize = 32;
Expand Down