Skip to content

Commit

Permalink
Merge #1481
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
bors[bot] and flxo authored Jul 29, 2021
2 parents 8519d9f + 8ed34b7 commit 62b227c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/sys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 62b227c

Please sign in to comment.