]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
fix: Only enable inode cache if subsecond stat timestamps are available
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 4 Aug 2022 18:55:19 +0000 (20:55 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 20 Aug 2022 12:17:37 +0000 (14:17 +0200)
If such fields are not available we risk false positive inode cache
hits.

(cherry picked from commit 879007ad0ced5373b314ac92590b665c072f814a)

cmake/GenerateConfigurationFile.cmake

index 8e2c2202f61926a8bb16905455516217aeba7808..efefb9d36758be11cc55165dfdc18a9b3abb3954 100644 (file)
@@ -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()