Stub out the utimesat emulation logic on Android.

Android always has `utimensat` available, so it is not necessary (or
possible, for that matter) to emulate it. Mark the fallback path as
`unreachable!()`.
This commit is contained in:
whitequark
2020-12-12 05:57:25 +00:00
committed by Dan Gohman
parent 743529b4eb
commit 919600d10b
2 changed files with 5 additions and 1 deletions

View File

@@ -53,5 +53,8 @@ pub fn utimensat(
return Err(err); return Err(err);
} }
super::utimesat::utimesat(dirfd, path, atime, mtime, symlink_nofollow) #[cfg(not(target_os = "android"))]
return super::utimesat::utimesat(dirfd, path, atime, mtime, symlink_nofollow);
#[cfg(target_os = "android")]
unreachable!();
} }

View File

@@ -2,4 +2,5 @@ pub(crate) mod dir;
pub(crate) mod fadvise; pub(crate) mod fadvise;
pub(crate) mod file; pub(crate) mod file;
pub(crate) mod filetime; pub(crate) mod filetime;
#[cfg(not(target_os = "android"))]
pub(crate) mod utimesat; pub(crate) mod utimesat;