Skip to content

Commit

Permalink
Android
Browse files Browse the repository at this point in the history
  • Loading branch information
d-e-s-o committed Oct 29, 2024
1 parent 619109e commit 42365c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ use cfg_aliases::cfg_aliases;

fn main() {
cfg_aliases! {
linux: { target_os = "linux" },
linux: { any(target_os = "linux", target_os = "android") },
}
}
2 changes: 1 addition & 1 deletion dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ xz2 = {version = "0.1.7", optional = true}
zip = {version = "2.0.0", optional = true, default-features = false}
zstd = {version = "0.13.1", default-features = false, optional = true}

[target.'cfg(target_os = "linux")'.build-dependencies]
[target.'cfg(any(target_os = "linux", target_os = "android"))'.build-dependencies]
libbpf-sys = {version = "1.4.1", default-features = false, optional = true}
4 changes: 2 additions & 2 deletions dev/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn data_dir() -> PathBuf {
}

/// Retrieve the system's page size.
#[cfg(target_os = "linux")]
#[cfg(any(target_os = "linux", target_os = "android"))]
fn page_size() -> Result<usize> {
// SAFETY: `sysconf` is always safe to call.
let rc = unsafe { libc::sysconf(libc::_SC_PAGE_SIZE) };
Expand All @@ -45,7 +45,7 @@ fn page_size() -> Result<usize> {
Ok(usize::try_from(rc).unwrap())
}

#[cfg(not(target_os = "linux"))]
#[cfg(not(any(target_os = "linux", target_os = "android")))]
fn page_size() -> Result<usize> {
unimplemented!()
}
Expand Down

0 comments on commit 42365c0

Please sign in to comment.