Skip to content

Commit

Permalink
Fixes errno on target_os = "android". (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso authored Nov 16, 2022
1 parent adb5ed3 commit c5a2b55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ macro_rules! libc_error_guard {
let args = vec![$(format!("{:?}", $arg)),*];
#[cfg(any(target_os = "freebsd", target_os = "ios", target_os = "macos"))]
let errno = *libc::__error();
#[cfg(any(target_os = "android", target_os = "netbsd", target_os = "openbsd"))]
let errno = *libc::__errno();
#[cfg(target_os = "linux")]
let errno = *libc::__errno_location();
return Err(EbpfError::LibcInvocationFailed(stringify!($function), args, errno));
Expand Down

0 comments on commit c5a2b55

Please sign in to comment.