mirror of
https://github.com/verilator/verilator.git
synced 2025-01-04 05:37:48 +00:00
Fix Windows include gates in filesystemFlush implementation. (#4720)
This commit is contained in:
parent
e5118661a7
commit
a7a48221d3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user