Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/addr_validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn create_pipe() -> nix::Result<(i32, i32)> {
}

#[inline]
#[cfg(any(target_os = "macos", target_os = "freebsd"))]
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "openbsd"))]
fn create_pipe() -> nix::Result<(i32, i32)> {
use nix::fcntl::{fcntl, FcntlArg, FdFlag, OFlag};
use nix::unistd::pipe;
Expand Down
11 changes: 11 additions & 0 deletions src/profiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ impl ErrnoProtector {
let errno = *libc::__error();
Self(errno)
}
#[cfg(target_os = "openbsd")]
{
let errno = *libc::__errno();
Self(errno)
}
}
}
}
Expand All @@ -267,6 +272,10 @@ impl Drop for ErrnoProtector {
{
*libc::__error() = self.0;
}
#[cfg(target_os = "openbsd")]
{
*libc::__errno() = self.0;
}
}
}
}
Expand Down Expand Up @@ -306,6 +315,8 @@ extern "C" fn perf_signal_handler(

#[cfg(all(target_arch = "x86_64", target_os = "freebsd"))]
let addr = unsafe { (*ucontext).uc_mcontext.mc_rip as usize };
#[cfg(all(target_arch = "x86_64", target_os = "openbsd"))]
let addr = unsafe { (*ucontext).sc_rip as usize };

#[cfg(all(target_arch = "x86_64", target_os = "macos"))]
let addr = unsafe {
Expand Down
Loading