From a7a48221d3749809aab21e64c3eeb53f6ef31dc5 Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Sun, 26 Nov 2023 04:26:20 +0000 Subject: [PATCH] Fix Windows include gates in filesystemFlush implementation. (#4720) --- src/V3Os.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/V3Os.cpp b/src/V3Os.cpp index daca75603..0ce45d5f2 100644 --- a/src/V3Os.cpp +++ b/src/V3Os.cpp @@ -300,7 +300,7 @@ void V3Os::createDir(const string& dirname) { 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 defined(_MSC_VER) || defined(__MINGW32__) if (int fd = ::open(dirname.c_str(), O_RDONLY)) { // LCOV_EXCL_BR_LINE if (fd > 0) ::close(fd); } @@ -316,7 +316,7 @@ void V3Os::filesystemFlush(const string& dirname) { void V3Os::filesystemFlushBuildDir(const string& dirname) { // Attempt to force out written directory, for NFS like file systems. -#ifndef _MSC_VER +#if !defined(_MSC_VER) && !defined(__MINGW32__) // Linux kernel may not reread from NFS unless timestamp modified struct timeval tv; gettimeofday(&tv, NULL);