Fix wrong utimes() param (#4829)

This commit is contained in:
Szymon Gizler 2024-01-17 14:32:44 +01:00 committed by GitHub
parent 6f96c6763d
commit db3ce29b36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -318,9 +318,7 @@ 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.
#if !defined(_MSC_VER) && !defined(__MINGW32__) #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; const int err = utimes(dirname.c_str(), nullptr);
gettimeofday(&tv, NULL);
const int err = utimes(dirname.c_str(), &tv);
// Not an error // Not an error
if (err != 0) UINFO(1, "-Info: File not utimed: " << dirname << endl); if (err != 0) UINFO(1, "-Info: File not utimed: " << dirname << endl);
#endif #endif