From: Tim Kientzle Date: Mon, 18 Jan 2010 16:23:42 +0000 (-0500) Subject: Windows resets atime at file close, so we can't use futimes() on Cygwin. X-Git-Tag: v2.8.0~8^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3f21bc0ac937dd8546389435b081246504874d4;p=thirdparty%2Flibarchive.git Windows resets atime at file close, so we can't use futimes() on Cygwin. SVN-Revision: 1832 --- diff --git a/cpio/cpio.c b/cpio/cpio.c index 1b2622e2f..5c61fba34 100644 --- a/cpio/cpio.c +++ b/cpio/cpio.c @@ -766,7 +766,7 @@ restore_time(struct cpio *cpio, struct archive_entry *entry, times[0].tv_sec = archive_entry_atime(entry); times[0].tv_usec = archive_entry_atime_nsec(entry) / 1000; -#ifdef HAVE_FUTIMES +#if defined(HAVE_FUTIMES) && !defined(__CYGWIN__) if (fd >= 0 && futimes(fd, times) == 0) return (fd); #endif