Skip to content

Commit

Permalink
Add missing musl utmpx.h constants
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewliebenow committed Sep 9, 2024
1 parent 1b11393 commit 9bc87f3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libc-test/semver/linux-musl.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# TODO: musl.
# linux-gnu.txt is alphabetized, but this file is not
EMPTY
RUN_LVL
BOOT_TIME
NEW_TIME
OLD_TIME
INIT_PROCESS
LOGIN_PROCESS
USER_PROCESS
DEAD_PROCESS
AF_IB
AF_MPLS
AF_XDP
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

0 comments on commit 9bc87f3

Please sign in to comment.