Skip to content

Commit 6987bba

Browse files
committed
Auto merge of #2634 - skrap:master, r=Amanieu
uclibc: Don't specialize PTRACE_O_MASK for uclibc This constant comes from the kernel headers, so its value should not depend on the libc type. To test: see instructions in #2566
2 parents 3b15a77 + c4d87be commit 6987bba

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

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

-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ pub const PTRACE_SETREGSET: ::c_int = 0x4205;
166166
pub const PTRACE_SEIZE: ::c_int = 0x4206;
167167
pub const PTRACE_INTERRUPT: ::c_int = 0x4207;
168168
pub const PTRACE_LISTEN: ::c_int = 0x4208;
169-
pub const PTRACE_O_MASK: ::c_int = 0x000000ff;
170169

171170
pub const POSIX_FADV_DONTNEED: ::c_int = 4;
172171
pub const POSIX_FADV_NOREUSE: ::c_int = 5;

src/unix/linux_like/mod.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,7 @@ pub const PTRACE_O_TRACEEXIT: ::c_int = 0x00000040;
11631163
pub const PTRACE_O_TRACESECCOMP: ::c_int = 0x00000080;
11641164
pub const PTRACE_O_SUSPEND_SECCOMP: ::c_int = 0x00200000;
11651165
pub const PTRACE_O_EXITKILL: ::c_int = 0x00100000;
1166+
pub const PTRACE_O_MASK: ::c_int = 0x003000ff;
11661167

11671168
// Wait extended result codes for the above trace options.
11681169
pub const PTRACE_EVENT_FORK: ::c_int = 1;
@@ -1364,12 +1365,6 @@ pub const ARPHRD_IEEE802154: u16 = 804;
13641365
pub const ARPHRD_VOID: u16 = 0xFFFF;
13651366
pub const ARPHRD_NONE: u16 = 0xFFFE;
13661367

1367-
cfg_if! {
1368-
if #[cfg(not(target_env = "uclibc"))] {
1369-
pub const PTRACE_O_MASK: ::c_int = 0x003000ff;
1370-
}
1371-
}
1372-
13731368
const_fn! {
13741369
{const} fn CMSG_ALIGN(len: usize) -> usize {
13751370
len + ::mem::size_of::<usize>() - 1 & !(::mem::size_of::<usize>() - 1)

0 commit comments

Comments
 (0)