From 8f460beae4cd1ce03430220ab6fc0b75c06e4841 Mon Sep 17 00:00:00 2001 From: Ryan Zoeller Date: Sat, 30 Mar 2024 14:01:44 -0500 Subject: [PATCH 1/3] Use alternate errno function on Android --- src/sys.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sys.rs b/src/sys.rs index 39b075a..68be472 100644 --- a/src/sys.rs +++ b/src/sys.rs @@ -74,7 +74,11 @@ impl FutexCall { self.val3, ) as i32; if result == -1 { - Err(Error(*libc::__errno_location())) + #[cfg(target_os = "linux")] + let errno = *libc::__errno_location(); + #[cfg(target_os = "android")] + let errno = *libc::__errno(); + Err(Error(errno)) } else { Ok(result) } From fa11e3fe7ba069c3490f602e2884e073a8a99b7c Mon Sep 17 00:00:00 2001 From: Ryan Zoeller Date: Sun, 19 May 2024 19:32:16 -0500 Subject: [PATCH 2/3] Bump libc dep to 0.2.155 for FUTEX_LOCK_PI2 on Android --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 6ec71b2..05b91b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,4 +11,4 @@ keywords = ["linux", "futex"] categories = ["concurrency", "os::unix-apis"] [dependencies] -libc = "0.2.132" +libc = "0.2.155" From e31e7b984a463b210f2d29ab3be95a339f701687 Mon Sep 17 00:00:00 2001 From: Ryan Zoeller Date: Mon, 20 May 2024 19:46:24 -0500 Subject: [PATCH 3/3] Test aarch64-linux-android build on CI --- .github/workflows/rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 118fcf6..1811c37 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -12,6 +12,7 @@ jobs: - i586-unknown-linux-gnu - aarch64-unknown-linux-gnu - armv7-unknown-linux-gnueabihf + - aarch64-linux-android steps: - uses: actions/checkout@v1 - name: Install toolchain