diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-07-29 01:20:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-29 01:20:21 +0000 |
commit | 62b227c199bd1926554177a309ad0fffaf17f049 (patch) | |
tree | 210f82edeea5579fe88e605fb5d07674a61734ce | |
parent | 8519d9f8c8e3b1cdf211774d309f8f21cf450528 (diff) | |
parent | 8ed34b72c8caf8aac10e5eafdaf7313b0b095905 (diff) | |
download | nix-62b227c199bd1926554177a309ad0fffaf17f049.zip |
Merge #1481
1481: Include `sys::eventfd` for target_os = "android" r=asomers a=flxo
Androids bionic [supports](https://android.googlesource.com/platform/bionic/+/d1ad4f6/libc/include/sys/eventfd.h) `eventfd`. The `libc` crate also exposes [`eventfd`](https://github.com/rust-lang/libc/blob/36a6a8e254db89cd31d178b4ba102055ceabf9a8/src/unix/linux_like/android/mod.rs#L2648) for target `android`.
Extend the conditional compilation check to include the target_os "android".
Fixes #1480
Co-authored-by: Felix Obenhuber <felix@obenhuber.de>
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | src/sys/mod.rs | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 97268ef2..e665b2d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,10 @@ This project adheres to [Semantic Versioning](https://semver.org/). 64-bit Android, change conditional compilation to include the field in 64-bit Android builds (#[1471](https://github.com/nix-rust/nix/pull/1471)) +- `eventfd`s are supported on Android, change conditional compilation to + include `sys::eventfd::eventfd` and `sys::eventfd::EfdFlags`for Android + builds. + (#[1481](https://github.com/nix-rust/nix/pull/1481)) ### Fixed diff --git a/src/sys/mod.rs b/src/sys/mod.rs index 43877a12..b43587b8 100644 --- a/src/sys/mod.rs +++ b/src/sys/mod.rs @@ -17,7 +17,7 @@ pub mod epoll; target_os = "openbsd"))] pub mod event; -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "android", target_os = "linux"))] pub mod eventfd; #[cfg(any(target_os = "android", |