Skip to content

Commit 0567d11

Browse files
andrewliebenowtgross35
authored andcommitted
Add missing musl utmpx.h constants
(backport <#3908>) (cherry picked from commit 6cd88a4)
1 parent 9de4a5c commit 0567d11

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

libc-test/semver/linux-musl.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,34 @@ MPOL_DEFAULT
1010
MPOL_INTERLEAVE
1111
MPOL_LOCAL
1212
MPOL_PREFERRED
13+
BOOT_TIME
14+
DEAD_PROCESS
1315
Elf32_Chdr
1416
Elf64_Chdr
17+
EMPTY
18+
INIT_PROCESS
1519
LIO_NOP
1620
LIO_NOWAIT
1721
LIO_READ
1822
LIO_WAIT
1923
LIO_WRITE
24+
LOGIN_PROCESS
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_SHARED_UMEM
3342
XDP_COPY
3443
XDP_ZEROCOPY

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

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

633633
pub const MS_RMT_MASK: ::c_ulong = 0x02800051;
634634

635+
// include/utmpx.h
636+
pub const EMPTY: ::c_short = 0;
637+
pub const RUN_LVL: ::c_short = 1;
638+
pub const BOOT_TIME: ::c_short = 2;
639+
pub const NEW_TIME: ::c_short = 3;
640+
pub const OLD_TIME: ::c_short = 4;
641+
pub const INIT_PROCESS: ::c_short = 5;
642+
pub const LOGIN_PROCESS: ::c_short = 6;
643+
pub const USER_PROCESS: ::c_short = 7;
644+
pub const DEAD_PROCESS: ::c_short = 8;
645+
// musl does not define ACCOUNTING
646+
635647
pub const SFD_CLOEXEC: ::c_int = 0x080000;
636648

637649
pub const NCCS: usize = 32;

0 commit comments

Comments
 (0)