The inode cache requires pthread_mutexattr_setpshared() and build fails on OSes
with sys/mman.h that do not have this function.
include(GenerateConfigurationFile)
include(GenerateVersionFile)
-if(HAVE_SYS_MMAN_H)
+if(HAVE_SYS_MMAN_H AND HAVE_PTHREAD_MUTEXATTR_SETPSHARED)
set(INODE_CACHE_SUPPORTED 1)
endif()
}
]=]
HAVE_PTHREAD_MUTEX_ROBUST)
+check_function_exists(pthread_mutexattr_setpshared HAVE_PTHREAD_MUTEXATTR_SETPSHARED)
set(CMAKE_REQUIRED_LINK_OPTIONS)
include(CheckStructHasMember)
// Define if you have the "posix_fallocate.
#cmakedefine HAVE_POSIX_FALLOCATE
+// Define if you have the "pthread_mutexattr_setpshared" function.
+#cmakedefine HAVE_PTHREAD_MUTEXATTR_SETPSHARED
+
// Define if you have the <pwd.h> header file.
#cmakedefine HAVE_PWD_H
# define O_BINARY 0
#endif
-#ifdef HAVE_SYS_MMAN_H
+#if defined(HAVE_SYS_MMAN_H) && defined(HAVE_PTHREAD_MUTEXATTR_SETPSHARED)
# define INODE_CACHE_SUPPORTED
#endif