mirror of
https://github.com/vgough/encfs.git
synced 2024-11-22 07:53:31 +01:00
parent
d820f708ad
commit
91e183fb85
@ -97,7 +97,12 @@ check_cxx_source_compiles ("#include <sys/types.h>
|
|||||||
include (CheckFuncs)
|
include (CheckFuncs)
|
||||||
check_function_exists_glibc (lchmod HAVE_LCHMOD)
|
check_function_exists_glibc (lchmod HAVE_LCHMOD)
|
||||||
check_function_exists_glibc (utimensat HAVE_UTIMENSAT)
|
check_function_exists_glibc (utimensat HAVE_UTIMENSAT)
|
||||||
check_function_exists_glibc (fdatasync HAVE_FDATASYNC)
|
if (APPLE)
|
||||||
|
message ("-- There is no usable FDATASYNC on Apple")
|
||||||
|
set(HAVE_FDATASYNC FALSE)
|
||||||
|
else()
|
||||||
|
check_function_exists_glibc (fdatasync HAVE_FDATASYNC)
|
||||||
|
endif (APPLE)
|
||||||
|
|
||||||
set (CMAKE_THREAD_PREFER_PTHREAD)
|
set (CMAKE_THREAD_PREFER_PTHREAD)
|
||||||
find_package (Threads REQUIRED)
|
find_package (Threads REQUIRED)
|
||||||
|
@ -258,7 +258,7 @@ int FileNode::sync(bool datasync) {
|
|||||||
int fh = io->open(O_RDONLY);
|
int fh = io->open(O_RDONLY);
|
||||||
if (fh >= 0) {
|
if (fh >= 0) {
|
||||||
int res = -EIO;
|
int res = -EIO;
|
||||||
#ifdef linux
|
#if defined(HAVE_FDATASYNC)
|
||||||
if (datasync) {
|
if (datasync) {
|
||||||
res = fdatasync(fh);
|
res = fdatasync(fh);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user