View on GitHub
File Changes
m
+1/-0
    #- env: TARGET=powerpc64-unknown-linux-gnu DISABLE_TESTS=1
    - env: TARGET=powerpc64le-unknown-linux-gnu DISABLE_TESTS=1
    - env: TARGET=x86_64-unknown-linux-musl
+
    - env: TARGET=aarch64-linux-android

                      
    # *BSD
    # - env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1

                      
#[derive(Debug, Error)]
pub enum DiagnosticError {
-
    #[cfg(unix)]
+
    #[cfg(all(unix, not(target_os = "android")))]
    #[error("while performing a UNIX syscall {0}")]
    UnixError(#[source] nix::Error),
    #[error("unknown diagnostic error")]

                      
impl Diagnostic {
    pub fn new() -> Result<Self, DiagnosticError> {
-
        #[cfg(unix)]
+
        #[cfg(all(unix, not(target_os = "android")))]
        {
            Ok(Self {
                open_files_limit: Some(getrlimit(RlimitResource::NoFile)?),
                cpu_usage_limit: Some(getrlimit(RlimitResource::CPU)?),
            })
        }
-
        #[cfg(not(unix))]
+
        #[cfg(any(not(unix), target_os = "android"))]
        {
            Ok(Self {
                open_files_limit: None,
    CPU,
}

                      
-
#[cfg(unix)]
+
#[cfg(all(unix, not(target_os = "android")))]
fn getrlimit(resource: RlimitResource) -> Result<u64, DiagnosticError> {
    use libc::rlimit;
    use std::convert::TryInto;