Skip to content

Commit c4a86e0

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
1 parent 95e5cdb commit c4a86e0

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
@@ -1325,6 +1325,8 @@ fn test_netbsd(target: &str) {
13251325
"__exit_status" => true,
13261326
// FIXME(netbsd): Should be importable but aren't for some reason.
13271327
"Aux32Info" | "Aux64Info" => true,
1328+
// deprecated, obsolete upstream
1329+
"ptrace_lwpinfo" => true,
13281330
_ => false,
13291331
}
13301332
});
@@ -1344,6 +1346,9 @@ fn test_netbsd(target: &str) {
13441346
"SIG_DFL" | "SIG_ERR" | "SIG_IGN" => true, // sighandler_t weirdness
13451347
"SIGUNUSED" => true, // removed in glibc 2.26
13461348

1349+
// deprecated, obsolete upstream
1350+
"PT_LWPINFO" | "PL_EVENT_NONE" | "PL_EVENT_SIGNAL" | "PL_EVENT_SUSPENDED" => true,
1351+
13471352
// weird signed extension or something like that?
13481353
"MS_NOUSER" => true,
13491354
"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
@@ -710,6 +710,7 @@ s! {
710710
pub fae: *mut posix_spawn_file_actions_entry_t,
711711
}
712712

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

1505+
#[deprecated(since = "0.2.178", note = "obsolete upstream")]
15041506
pub const PL_EVENT_NONE: c_int = 0;
1507+
#[deprecated(since = "0.2.178", note = "obsolete upstream")]
15051508
pub const PL_EVENT_SIGNAL: c_int = 1;
1509+
#[deprecated(since = "0.2.178", note = "obsolete upstream")]
15061510
pub const PL_EVENT_SUSPENDED: c_int = 2;
15071511

15081512
cfg_if! {
@@ -1883,6 +1887,7 @@ pub const SIGSTKSZ: size_t = 40960;
18831887
pub const REG_ILLSEQ: c_int = 17;
18841888

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

0 commit comments

Comments
 (0)