Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Unified Diff: base/platform_file_posix.cc

Issue 13818027: posix: replace nonstandard futimes call with futimens (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change Time::ToTimeVal to Time::ToTimeSpec Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/platform_file_unittest.cc » ('j') | base/time.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/platform_file_posix.cc
diff --git a/base/platform_file_posix.cc b/base/platform_file_posix.cc
index 646c82e8dfd2ec74e6a600a4874f191f360776e9..86073af270d99b87c2f14959cb9f5dceb287ba79 100644
--- a/base/platform_file_posix.cc
+++ b/base/platform_file_posix.cc
@@ -298,10 +298,11 @@ bool TouchPlatformFile(PlatformFile file, const base::Time& last_access_time,
if (file < 0)
return false;
- timeval times[2];
- times[0] = last_access_time.ToTimeVal();
- times[1] = last_modified_time.ToTimeVal();
- return !futimes(file, times);
+ timespec times[2];
+ times[0] = last_access_time.ToTimeSpec();
+ times[1] = last_modified_time.ToTimeSpec();
+
+ return !futimens(file, times);
}
bool GetPlatformFileInfo(PlatformFile file, PlatformFileInfo* info) {
« no previous file with comments | « no previous file | base/platform_file_unittest.cc » ('j') | base/time.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698