Skip to content

Commit 981df92

Browse files
bors[bot]flxo
andauthored
Merge #1773
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>
2 parents 00f6981 + e357d60 commit 981df92

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
66
## [Unreleased] - ReleaseDate
77
### Added
88

9+
- Added `memfd` on Android.
10+
(#[1773](https://github.com/nix-rust/nix/pull/1773))
911
- Added ETH_P_ALL to SockProtocol enum
1012
(#[1768](https://github.com/nix-rust/nix/pull/1768))
1113
- Added four non-standard Linux `SysconfVar` variants

src/sys/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ feature! {
5050
#[macro_use]
5151
pub mod ioctl;
5252

53-
#[cfg(target_os = "linux")]
53+
#[cfg(any(target_is = "android", target_os = "linux"))]
5454
feature! {
5555
#![feature = "fs"]
5656
pub mod memfd;

0 commit comments

Comments
 (0)