diff options
author | Raphael Moll <raphael@google.com> | 2010-10-13 16:50:05 -0700 |
---|---|---|
committer | Raphael <raphael@google.com> | 2010-11-01 15:53:45 -0700 |
commit | a63e3cc186ff2eabbab45563feafa44839074e59 (patch) | |
tree | 1950f358591834f867ae0f57bded7be03c71a569 /libs | |
parent | 3bab7f036c151f8fd8ff3e1ff058d8f07f01b647 (diff) | |
download | build-a63e3cc186ff2eabbab45563feafa44839074e59.zip build-a63e3cc186ff2eabbab45563feafa44839074e59.tar.gz build-a63e3cc186ff2eabbab45563feafa44839074e59.tar.bz2 |
Cygwin fix: Use new #if HAVE_STAT_ST_MTIM
stat.st_mtim doesn't exist under MinGW or Cygwin.
Change-Id: I0d9c81a0529d8d289d84600ed9d1a451e7f1f258
Diffstat (limited to 'libs')
-rw-r--r-- | libs/host/CopyFile.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/host/CopyFile.c b/libs/host/CopyFile.c index 44c7c2b..23f1260 100644 --- a/libs/host/CopyFile.c +++ b/libs/host/CopyFile.c @@ -64,18 +64,19 @@ static bool isSourceNewer(const struct stat* pSrcStat, const struct stat* pDstSt /* * Returns true if the source file has high resolution modification - * date. Cygwin doesn't support st_mtim in normal build, so always - * return false. + * date. Cygwin/Mingw doesn't support st_mtim and always returns false. */ static bool isHiresMtime(const struct stat* pSrcStat) { -#if defined(WIN32_EXE) || defined(USE_MINGW) - return 0; -#elif defined(MACOSX_RSRC) +#if HAVE_STAT_ST_MTIM +#if defined(MACOSX_RSRC) return pSrcStat->st_mtimespec.tv_nsec > 0; #else return pSrcStat->st_mtim.tv_nsec > 0; #endif +#else + return 0; +#endif } /* |