Skip to content

Commit

Permalink
Fix android build
Browse files Browse the repository at this point in the history
  • Loading branch information
mbuesch committed Oct 12, 2024
1 parent 6c9278d commit 1b06243
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions letmein-seccomp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ impl Filter {
}
Allow::ArchPrctl { op: _ } => {
//TODO restrict to op
#[cfg(not(target_os = "android"))]
add_sys(&mut map, sys!(SYS_arch_prctl));
}
Allow::Dup => {
Expand Down Expand Up @@ -305,6 +306,7 @@ impl Filter {
Allow::Access => {
add_sys(&mut map, sys!(SYS_access));
add_sys(&mut map, sys!(SYS_faccessat));
#[cfg(not(target_os = "android"))]
add_sys(&mut map, sys!(SYS_faccessat2));
}
Allow::Open => {
Expand Down Expand Up @@ -339,6 +341,7 @@ impl Filter {
Allow::Stat => {
add_sys(&mut map, sys!(SYS_fstat));
add_sys(&mut map, sys!(SYS_statx));
#[cfg(not(target_os = "android"))]
add_sys(&mut map, sys!(SYS_newfstatat));
}
Allow::Recv => {
Expand Down Expand Up @@ -375,9 +378,11 @@ impl Filter {
add_sys(&mut map, sys!(SYS_set_tid_address));
}
Allow::Rseq => {
#[cfg(not(target_os = "android"))]
add_sys(&mut map, sys!(SYS_rseq));
}
Allow::Clone => {
#[cfg(not(target_os = "android"))]
add_sys(&mut map, sys!(SYS_clone3));
}
Allow::Exec => {
Expand Down

0 comments on commit 1b06243

Please sign in to comment.