diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index eb1b18375403f..700b6fd0d408e 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -327,13 +327,14 @@ s! { // to false. So I'm just removing these, and if uClibc changes // the #if block in the future to include the following fields, these // will probably need including here. tsidea, skrap - #[cfg(not(target_env = "uclibc"))] + // QNX (NTO) platform does not define these fields + #[cfg(not(any(target_env = "uclibc", target_os = "nto")))] pub dlpi_adds: ::c_ulonglong, - #[cfg(not(target_env = "uclibc"))] + #[cfg(not(any(target_env = "uclibc", target_os = "nto")))] pub dlpi_subs: ::c_ulonglong, - #[cfg(not(target_env = "uclibc"))] + #[cfg(not(any(target_env = "uclibc", target_os = "nto")))] pub dlpi_tls_modid: ::size_t, - #[cfg(not(target_env = "uclibc"))] + #[cfg(not(any(target_env = "uclibc", target_os = "nto")))] pub dlpi_tls_data: *mut ::c_void, } 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,