From 607f5f95a450000068a6d68c36dd5fb6ae39c984 Mon Sep 17 00:00:00 2001 From: Orvid King Date: Tue, 28 Jul 2015 15:15:49 -0700 Subject: [PATCH] Use fsync on MSVC, as fdatasync doesn't exist Summary: Closes #266 Reviewed By: @yfeldblum Differential Revision: D2283774 Pulled By: @sgolemon --- folly/FileUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/FileUtil.cpp b/folly/FileUtil.cpp index a62b365e..728f1d26 100644 --- a/folly/FileUtil.cpp +++ b/folly/FileUtil.cpp @@ -65,7 +65,7 @@ int dup2NoInt(int oldfd, int newfd) { int fdatasyncNoInt(int fd) { #if defined(__APPLE__) return wrapNoInt(fcntl, fd, F_FULLFSYNC); -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(_MSC_VER) return wrapNoInt(fsync, fd); #else return wrapNoInt(fdatasync, fd); -- 2.34.1