Update iotest_nonblock.cpp

This commit is contained in:
alexey-milovidov 2021-11-13 01:31:37 +03:00 committed by GitHub
parent 8bcef97e11
commit e0cf4bf568
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,15 +136,13 @@ int mainImpl(int argc, char ** argv)
for (size_t i = 0; i < descriptors; ++i)
{
#if defined(OS_DARWIN)
#if defined(OS_DARWIN)
if (fsync(fds[i]))
throwFromErrno("Cannot fsync", ErrorCodes::CANNOT_FSYNC);
#else
#else
if (fdatasync(fds[i]))
throwFromErrno("Cannot fdatasync", ErrorCodes::CANNOT_FSYNC);
#endif
if (fdatasync(fds[i]))
throwFromErrno("Cannot fsync", ErrorCodes::CANNOT_FSYNC);
#endif
}
watch.stop();