Skip to content

Commit 80e055a

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

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

libc-test/semver/linux-musl.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,44 @@ 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+
MPOL_BIND
25+
MPOL_DEFAULT
26+
MPOL_INTERLEAVE
27+
MPOL_LOCAL
28+
MPOL_PREFERRED
29+
LOGIN_PROCESS
30+
MPOL_BIND
31+
MPOL_DEFAULT
32+
MPOL_INTERLEAVE
33+
MPOL_LOCAL
34+
MPOL_PREFERRED
35+
NEW_TIME
36+
OLD_TIME
2037
PF_IB
2138
PF_MPLS
2239
PF_XDP
2340
PIDFD_NONBLOCK
2441
PR_SET_VMA
2542
PR_SET_VMA_ANON_NAME
43+
RUN_LVL
2644
RWF_APPEND
2745
RWF_DSYNC
2846
RWF_HIPRI
2947
RWF_NOWAIT
3048
RWF_SYNC
3149
SOL_XDP
50+
USER_PROCESS
3251
XDP_SHARED_UMEM
3352
XDP_COPY
3453
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)