Skip to content

Commit

Permalink
Merge #1773
Browse files Browse the repository at this point in the history
1773: Add memfd for target_os = "android" r=asomers a=flxo

Memory fds (`memfd`) are implemented and exported by Androids bionic.
Export the `memfd` module if the target os is `android`.

https://cs.android.com/android/platform/superproject/+/master:bionic/libc/include/sys/mman.h;drc=23c7543b8e608ebcbb38b952761b54bb56065577;bpv=1;bpt=1;l=182

Co-authored-by: Felix Obenhuber <felix@obenhuber.de>
  • Loading branch information
bors[bot] and flxo authored Jul 25, 2022
2 parents 00f6981 + e357d60 commit 981df92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
## [Unreleased] - ReleaseDate
### Added

- Added `memfd` on Android.
(#[1773](https://github.com/nix-rust/nix/pull/1773))
- Added ETH_P_ALL to SockProtocol enum
(#[1768](https://github.com/nix-rust/nix/pull/1768))
- Added four non-standard Linux `SysconfVar` variants
Expand Down
2 changes: 1 addition & 1 deletion src/sys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ feature! {
#[macro_use]
pub mod ioctl;

#[cfg(target_os = "linux")]
#[cfg(any(target_is = "android", target_os = "linux"))]
feature! {
#![feature = "fs"]
pub mod memfd;
Expand Down

0 comments on commit 981df92

Please sign in to comment.