From 1c7f2919e618a8be777110ac9fea7d6db1680bc1 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Mon, 5 Aug 2024 18:32:01 -0400 Subject: [PATCH] Modify QNX NTO `dl_iterate_phdr` to toke `* mut` All other platforms use `* mut`, and while this is technically a breaking change, most likely noone is using it directly. See also https://github.com/rust-lang/backtrace-rs/pull/648 --- src/unix/nto/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/unix/nto/mod.rs b/src/unix/nto/mod.rs index 73fd2ba9f49fc..001b51a7da678 100644 --- a/src/unix/nto/mod.rs +++ b/src/unix/nto/mod.rs @@ -3340,7 +3340,10 @@ extern "C" { pub fn dl_iterate_phdr( callback: ::Option< unsafe extern "C" fn( - info: *const dl_phdr_info, + // The original .h file declares this as *const, but for consistency with other platforms, + // changing this to *mut to make it easier to use. + // Maybe in v0.3 all platforms should use this as a *const. + info: *mut dl_phdr_info, size: ::size_t, data: *mut ::c_void, ) -> ::c_int,