summaryrefslogtreecommitdiff
path: root/src/sys/stat.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/stat.rs')
-rw-r--r--src/sys/stat.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sys/stat.rs b/src/sys/stat.rs
index e0367859..1e0936ed 100644
--- a/src/sys/stat.rs
+++ b/src/sys/stat.rs
@@ -209,7 +209,12 @@ pub fn utimes<P: ?Sized + NixPath>(path: &P, atime: &TimeVal, mtime: &TimeVal) -
/// # References
///
/// [lutimes(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/lutimes.html).
-#[cfg(not(target_os = "android"))]
+#[cfg(any(target_os = "linux",
+ target_os = "haiku",
+ target_os = "ios",
+ target_os = "macos",
+ target_os = "freebsd",
+ target_os = "netbsd"))]
pub fn lutimes<P: ?Sized + NixPath>(path: &P, atime: &TimeVal, mtime: &TimeVal) -> Result<()> {
let times: [libc::timeval; 2] = [*atime.as_ref(), *mtime.as_ref()];
let res = path.with_nix_path(|cstr| unsafe {