Skip to content

Commit

Permalink
fix: type error on Android arm64 and x64
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC committed Dec 8, 2022
1 parent 15a27a9 commit 04e0818
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sys/memfd.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Interfaces for managing memory-backed files.
use cfg_if::cfg_if;
use std::os::unix::io::{FromRawFd, OwnedFd};
use std::os::unix::io::{FromRawFd, OwnedFd, RawFd};

use crate::errno::Errno;
use crate::Result;
Expand Down Expand Up @@ -60,5 +60,5 @@ pub fn memfd_create(name: &CStr, flags: MemFdCreateFlag) -> Result<OwnedFd> {
}
};

Errno::result(res).map(|r| unsafe { OwnedFd::from_raw_fd(r) })
Errno::result(res).map(|r| unsafe { OwnedFd::from_raw_fd(r as RawFd) })
}

0 comments on commit 04e0818

Please sign in to comment.