Skip to content

Commit 2d221d7

Browse files
authored
Merge pull request #3908 from andrewliebenow/add-missing-musl-constants
Add missing musl utmpx.h constants
2 parents d8ff07b + 6cd88a4 commit 2d221d7

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

libc-test/semver/linux-musl.txt

+9
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,39 @@ AF_XDP
55
AIO_ALLDONE
66
AIO_CANCELED
77
AIO_NOTCANCELED
8+
BOOT_TIME
9+
DEAD_PROCESS
810
Elf32_Chdr
911
Elf64_Chdr
12+
EMPTY
13+
INIT_PROCESS
1014
LIO_NOP
1115
LIO_NOWAIT
1216
LIO_READ
1317
LIO_WAIT
1418
LIO_WRITE
19+
LOGIN_PROCESS
1520
MPOL_BIND
1621
MPOL_DEFAULT
1722
MPOL_INTERLEAVE
1823
MPOL_LOCAL
1924
MPOL_PREFERRED
25+
NEW_TIME
26+
OLD_TIME
2027
PF_IB
2128
PF_MPLS
2229
PF_XDP
2330
PIDFD_NONBLOCK
2431
PR_SET_VMA
2532
PR_SET_VMA_ANON_NAME
33+
RUN_LVL
2634
RWF_APPEND
2735
RWF_DSYNC
2836
RWF_HIPRI
2937
RWF_NOWAIT
3038
RWF_SYNC
3139
SOL_XDP
40+
USER_PROCESS
3241
XDP_COPY
3342
XDP_MMAP_OFFSETS
3443
XDP_OPTIONS

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

+12
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)