mirror of
https://github.com/verilator/verilator.git
synced 2025-02-01 11:14:03 +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) {
|
void V3Os::filesystemFlush(const string& dirname) {
|
||||||
// NFS caches stat() calls so to get up-to-date information must
|
// NFS caches stat() calls so to get up-to-date information must
|
||||||
// do a open or opendir on the filename.
|
// 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 (int fd = ::open(dirname.c_str(), O_RDONLY)) { // LCOV_EXCL_BR_LINE
|
||||||
if (fd > 0) ::close(fd);
|
if (fd > 0) ::close(fd);
|
||||||
}
|
}
|
||||||
@ -316,7 +316,7 @@ void V3Os::filesystemFlush(const string& dirname) {
|
|||||||
|
|
||||||
void V3Os::filesystemFlushBuildDir(const string& dirname) {
|
void V3Os::filesystemFlushBuildDir(const string& dirname) {
|
||||||
// Attempt to force out written directory, for NFS like file systems.
|
// 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
|
// Linux kernel may not reread from NFS unless timestamp modified
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user