Fix MSWIN compile in last commit

This commit is contained in:
Wilson Snyder 2023-11-21 21:49:36 -05:00
parent b15ef49c57
commit 2b28ddd0c6
1 changed files with 2 additions and 2 deletions

View File

@ -47,6 +47,7 @@ VL_DEFINE_DEBUG_FUNCTIONS;
#include <dirent.h>
#include <utime.h>
#endif
#include <fcntl.h>
#include <fstream>
#include <memory>
@ -76,7 +77,6 @@ VL_DEFINE_DEBUG_FUNCTIONS;
# include <sys/time.h>
# include <sys/wait.h> // Needed on FreeBSD for WIFEXITED
# include <unistd.h> // usleep
# include <fcntl.h>
#endif
// clang-format on
@ -301,7 +301,7 @@ void V3Os::filesystemFlush(const string& dirname) {
// NFS caches stat() calls so to get up-to-date information must
// do a open or opendir on the filename.
#ifdef _MSC_VER
if (int fd = ::open(filename.c_str(), O_RDONLY)) { // LCOV_EXCL_BR_LINE
if (int fd = ::open(dirname.c_str(), O_RDONLY)) { // LCOV_EXCL_BR_LINE
if (fd > 0) ::close(fd);
}
#else