diff --git a/src/fs_base_fsync.hpp b/src/fs_base_fsync.hpp index 53dfcd40..61b9a2ad 100644 --- a/src/fs_base_fsync.hpp +++ b/src/fs_base_fsync.hpp @@ -16,6 +16,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include #include namespace fs @@ -33,6 +34,10 @@ namespace fs int fdatasync(const int fd) { +#if _POSIX_SYNCHRONIZED_IO > 0 return ::fdatasync(fd); +#else + return (errno=ENOSYS,-1); +#endif } }