Skip to content

Commit 980cd40

Browse files
committed
NetBSD: Account for upstream changes to ptrace with LWP
Deprecate the PT_LWPINFO and PL_EVENT* constants, as well as `ptrace_lwpinfo`. Upstream commit: NetBSD/src@4f79a48 (backport <#4782>) (cherry picked from commit c4a86e0)
1 parent ac8cd41 commit 980cd40

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

libc-test/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,8 @@ fn test_netbsd(target: &str) {
14131413
"__exit_status" => true,
14141414
// FIXME(netbsd): Should be importable but aren't for some reason.
14151415
"Aux32Info" | "Aux64Info" => true,
1416+
// deprecated, obsolete upstream
1417+
"ptrace_lwpinfo" => true,
14161418
_ => false,
14171419
}
14181420
});
@@ -1432,6 +1434,9 @@ fn test_netbsd(target: &str) {
14321434
"SIG_DFL" | "SIG_ERR" | "SIG_IGN" => true, // sighandler_t weirdness
14331435
"SIGUNUSED" => true, // removed in glibc 2.26
14341436

1437+
// deprecated, obsolete upstream
1438+
"PT_LWPINFO" | "PL_EVENT_NONE" | "PL_EVENT_SIGNAL" | "PL_EVENT_SUSPENDED" => true,
1439+
14351440
// weird signed extension or something like that?
14361441
"MS_NOUSER" => true,
14371442
"MS_RMT_MASK" => true, // updated in glibc 2.22 and musl 1.1.13

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,7 @@ s! {
711711
pub fae: *mut posix_spawn_file_actions_entry_t,
712712
}
713713

714+
#[deprecated(since = "0.2.178", note = "obsolete upstream")]
714715
pub struct ptrace_lwpinfo {
715716
pub pl_lwpid: lwpid_t,
716717
pub pl_event: c_int,
@@ -1502,8 +1503,11 @@ pub const TIME_ERROR: c_int = 5;
15021503
pub const LITTLE_ENDIAN: c_int = 1234;
15031504
pub const BIG_ENDIAN: c_int = 4321;
15041505

1506+
#[deprecated(since = "0.2.178", note = "obsolete upstream")]
15051507
pub const PL_EVENT_NONE: c_int = 0;
1508+
#[deprecated(since = "0.2.178", note = "obsolete upstream")]
15061509
pub const PL_EVENT_SIGNAL: c_int = 1;
1510+
#[deprecated(since = "0.2.178", note = "obsolete upstream")]
15071511
pub const PL_EVENT_SUSPENDED: c_int = 2;
15081512

15091513
cfg_if! {
@@ -1884,6 +1888,7 @@ pub const SIGSTKSZ: size_t = 40960;
18841888
pub const REG_ILLSEQ: c_int = 17;
18851889

18861890
pub const PT_DUMPCORE: c_int = 12;
1891+
#[deprecated(note = "obsolete operation")]
18871892
pub const PT_LWPINFO: c_int = 13;
18881893
pub const PT_SYSCALL: c_int = 14;
18891894
pub const PT_SYSCALLEMU: c_int = 15;

0 commit comments

Comments
 (0)