Skip to content

Commit 9bc87f3

Browse files
Add missing musl utmpx.h constants
1 parent 1b11393 commit 9bc87f3

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

libc-test/semver/linux-musl.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
# TODO: musl.
2+
# linux-gnu.txt is alphabetized, but this file is not
3+
EMPTY
4+
RUN_LVL
5+
BOOT_TIME
6+
NEW_TIME
7+
OLD_TIME
8+
INIT_PROCESS
9+
LOGIN_PROCESS
10+
USER_PROCESS
11+
DEAD_PROCESS
212
AF_IB
313
AF_MPLS
414
AF_XDP

src/unix/linux_like/linux/musl/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,18 @@ pub const MAP_HUGE_16GB: ::c_int = 34 << MAP_HUGE_SHIFT;
628628

629629
pub const MS_RMT_MASK: ::c_ulong = 0x02800051;
630630

631+
// include/utmpx.h
632+
pub const EMPTY: ::c_short = 0;
633+
pub const RUN_LVL: ::c_short = 1;
634+
pub const BOOT_TIME: ::c_short = 2;
635+
pub const NEW_TIME: ::c_short = 3;
636+
pub const OLD_TIME: ::c_short = 4;
637+
pub const INIT_PROCESS: ::c_short = 5;
638+
pub const LOGIN_PROCESS: ::c_short = 6;
639+
pub const USER_PROCESS: ::c_short = 7;
640+
pub const DEAD_PROCESS: ::c_short = 8;
641+
// musl does not define ACCOUNTING
642+
631643
pub const SFD_CLOEXEC: ::c_int = 0x080000;
632644

633645
pub const NCCS: usize = 32;

0 commit comments

Comments
 (0)