Cygwin fix: Use new #if HAVE_STAT_ST_MTIM
stat.st_mtim doesn't exist under MinGW or Cygwin. Change-Id: I0d9c81a0529d8d289d84600ed9d1a451e7f1f258
This commit is contained in:
@@ -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
|
* Returns true if the source file has high resolution modification
|
||||||
* date. Cygwin doesn't support st_mtim in normal build, so always
|
* date. Cygwin/Mingw doesn't support st_mtim and always returns false.
|
||||||
* return false.
|
|
||||||
*/
|
*/
|
||||||
static bool isHiresMtime(const struct stat* pSrcStat)
|
static bool isHiresMtime(const struct stat* pSrcStat)
|
||||||
{
|
{
|
||||||
#if defined(WIN32_EXE) || defined(USE_MINGW)
|
#if HAVE_STAT_ST_MTIM
|
||||||
return 0;
|
#if defined(MACOSX_RSRC)
|
||||||
#elif defined(MACOSX_RSRC)
|
|
||||||
return pSrcStat->st_mtimespec.tv_nsec > 0;
|
return pSrcStat->st_mtimespec.tv_nsec > 0;
|
||||||
#else
|
#else
|
||||||
return pSrcStat->st_mtim.tv_nsec > 0;
|
return pSrcStat->st_mtim.tv_nsec > 0;
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user