Skip to content

Commit

Permalink
Add QNX NTO platform support
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed Aug 1, 2024
1 parent fd0aed5 commit 64cbb2b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/backtrace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ cfg_if::cfg_if! {
unix,
not(target_os = "emscripten"),
not(all(target_os = "ios", target_arch = "arm")),
not(all(target_os = "nto", target_env = "nto70")),
),
all(
target_env = "sgx",
Expand Down
1 change: 1 addition & 0 deletions src/symbolize/gimli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ cfg_if::cfg_if! {
target_os = "hurd",
target_os = "openbsd",
target_os = "netbsd",
target_os = "nto",
all(target_os = "android", feature = "dl_iterate_phdr"),
),
not(target_env = "uclibc"),
Expand Down
4 changes: 3 additions & 1 deletion src/symbolize/gimli/libs_dl_iterate_phdr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ fn infer_current_exe(base_addr: usize) -> OsString {

// `info` should be a valid pointers.
// `vec` should be a valid pointer to a `std::Vec`.
// On `QNX-NTO` platform, info is a const pointer
unsafe extern "C" fn callback(
info: *mut libc::dl_phdr_info,
#[cfg(not(target_os = "nto"))] info: *mut libc::dl_phdr_info,
#[cfg(target_os = "nto")] info: *const libc::dl_phdr_info,
_size: libc::size_t,
vec: *mut libc::c_void,
) -> libc::c_int {
Expand Down

0 comments on commit 64cbb2b

Please sign in to comment.