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.6.2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c31f4e4174483bd7db90dd2b0c28fae27d9083a8;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. (cherry picked from commit 879007ad0ced5373b314ac92590b665c072f814a) --- diff --git a/cmake/GenerateConfigurationFile.cmake b/cmake/GenerateConfigurationFile.cmake index 8e2c2202f..efefb9d36 100644 --- a/cmake/GenerateConfigurationFile.cmake +++ b/cmake/GenerateConfigurationFile.cmake @@ -110,7 +110,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()