fix the build on linux

master
Andrew Kelley 2019-07-15 01:43:40 -04:00
parent b23ace27db
commit 6237380b01
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1 changed files with 4 additions and 4 deletions

View File

@ -269,12 +269,12 @@ pub const File = struct {
}
const times = [2]os.timespec{
os.timespec{
.tv_sec = atime / std.time.ns_per_s,
.tv_nsec = atime % std.time.ns_per_s,
.tv_sec = @divFloor(atime, std.time.ns_per_s),
.tv_nsec = @mod(atime, std.time.ns_per_s),
},
os.timespec{
.tv_sec = mtime / std.time.ns_per_s,
.tv_nsec = mtime % std.time.ns_per_s,
.tv_sec = @divFloor(mtime, std.time.ns_per_s),
.tv_nsec = @mod(mtime, std.time.ns_per_s),
},
};
try os.futimens(self.handle, &times);