Skip to content

Commit 5d2f261

Browse files
committed
Add sys/personality.h constants for Linux
1 parent 7c3030f commit 5d2f261

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,10 @@ pub const NDA_MASTER: ::c_ushort = 9;
771771
pub const NDA_LINK_NETNSID: ::c_ushort = 10;
772772
pub const NDA_SRC_VNI: ::c_ushort = 11;
773773

774+
// linux/personality.h
775+
pub const UNAME26: ::c_int = 0x0020000;
776+
pub const FDPIC_FUNCPTRS: ::c_int = 0x0080000;
777+
774778
// linux/if_addr.h
775779
pub const IFA_FLAGS: ::c_ushort = 8;
776780

src/unix/linux_like/mod.rs

+11
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,17 @@ pub const WEXITED: ::c_int = 0x00000004;
961961
pub const WCONTINUED: ::c_int = 0x00000008;
962962
pub const WNOWAIT: ::c_int = 0x01000000;
963963

964+
// Options for personality(2).
965+
pub const ADDR_NO_RANDOMIZE: ::c_int = 0x0040000;
966+
pub const MMAP_PAGE_ZERO: ::c_int = 0x0100000;
967+
pub const ADDR_COMPAT_LAYOUT: ::c_int = 0x0200000;
968+
pub const READ_IMPLIES_EXEC: ::c_int = 0x0400000;
969+
pub const ADDR_LIMIT_32BIT: ::c_int = 0x0800000;
970+
pub const SHORT_INODE: ::c_int = 0x1000000;
971+
pub const WHOLE_SECONDS: ::c_int = 0x2000000;
972+
pub const STICKY_TIMEOUTS: ::c_int = 0x4000000;
973+
pub const ADDR_LIMIT_3GB: ::c_int = 0x8000000;
974+
964975
// Options set using PTRACE_SETOPTIONS.
965976
pub const PTRACE_O_TRACESYSGOOD: ::c_int = 0x00000001;
966977
pub const PTRACE_O_TRACEFORK: ::c_int = 0x00000002;

0 commit comments

Comments
 (0)