From: Joel Rosdahl Date: Thu, 4 Aug 2022 18:55:19 +0000 (+0200) Subject: fix: Only enable inode cache if subsecond stat timestamps are available X-Git-Tag: v4.7~122 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=879007ad0ced5373b314ac92590b665c072f814a;p=thirdparty%2Fccache.git fix: Only enable inode cache if subsecond stat timestamps are available If such fields are not available we risk false positive inode cache hits. --- diff --git a/cmake/GenerateConfigurationFile.cmake b/cmake/GenerateConfigurationFile.cmake index e18b37955..1467850df 100644 --- a/cmake/GenerateConfigurationFile.cmake +++ b/cmake/GenerateConfigurationFile.cmake @@ -104,7 +104,7 @@ endif() # alias set(MTR_ENABLED "${ENABLE_TRACING}") -if(HAVE_SYS_MMAN_H AND HAVE_PTHREAD_MUTEXATTR_SETPSHARED) +if(HAVE_SYS_MMAN_H AND HAVE_PTHREAD_MUTEXATTR_SETPSHARED AND (HAVE_STRUCT_STAT_ST_MTIM OR HAVE_STRUCT_STAT_ST_MTIMESPEC)) set(INODE_CACHE_SUPPORTED 1) endif()