Skip to content

Commit be528e9

Browse files
committed
Add missing AT_* constants from sys/auxv.h
1 parent 33dd3b9 commit be528e9

File tree

1 file changed

+27
-0
lines changed
  • src/unix/linux_like/linux/gnu

1 file changed

+27
-0
lines changed

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

+27
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,33 @@ pub const STATX_ATTR_NODUMP: ::c_int = 0x0040;
874874
pub const STATX_ATTR_ENCRYPTED: ::c_int = 0x0800;
875875
pub const STATX_ATTR_AUTOMOUNT: ::c_int = 0x1000;
876876

877+
// sys/auxv.h
878+
pub const AT_NULL: ::c_ulong = 0; // end of vector
879+
pub const AT_IGNORE: ::c_ulong = 1; // entry should be ignored
880+
pub const AT_EXECFD: ::c_ulong = 2; // file descriptor of program
881+
pub const AT_PHDR: ::c_ulong = 3; // program headers for program
882+
pub const AT_PHENT: ::c_ulong = 4; // size of program header entry
883+
pub const AT_PHNUM: ::c_ulong = 5; // number of program headers
884+
pub const AT_PAGESZ: ::c_ulong = 6; // system page size
885+
pub const AT_BASE: ::c_ulong = 7; // base address of interpreter
886+
pub const AT_FLAGS: ::c_ulong = 8; // flags
887+
pub const AT_ENTRY: ::c_ulong = 9; // entry point of program
888+
pub const AT_NOTELF: ::c_ulong = 10; // program is not ELF
889+
pub const AT_UID: ::c_ulong = 11; // real uid
890+
pub const AT_EUID: ::c_ulong = 12; // effective uid
891+
pub const AT_GID: ::c_ulong = 13; // real gid
892+
pub const AT_EGID: ::c_ulong = 14; // effective gid
893+
pub const AT_PLATFORM: ::c_ulong = 15; // string identifying CPU for optimizations
894+
pub const AT_HWCAP: ::c_ulong = 16; // arch dependent hints at CPU capabilities
895+
pub const AT_CLKTCK: ::c_ulong = 17; // frequency at which times() increments
896+
// AT_* values 18 through 22 are reserved
897+
pub const AT_SECURE: ::c_ulong = 23; // secure mode boolean
898+
pub const AT_BASE_PLATFORM: ::c_ulong = 24; // string identifying real platform, may differ from AT_PLATFORM.
899+
pub const AT_RANDOM: ::c_ulong = 25; // address of 16 random bytes
900+
pub const AT_HWCAP2: ::c_ulong = 26; // extension of AT_HWCAP
901+
902+
pub const AT_EXECFN: ::c_ulong = 31; // filename of program
903+
877904
cfg_if! {
878905
if #[cfg(any(
879906
target_arch = "arm",

0 commit comments

Comments
 (0)