mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-10 14:50:58 +00:00
Use CLOCK_REALTIME for UTIME_NOW (#1881)
Previously s3fs_utimens used CLOCK_MONOTONIC_COARSE which was not 1970-based. Found via pjdfstest. References #1589.
This commit is contained in:
parent
f6ed972926
commit
9224f792f0
@ -1966,7 +1966,7 @@ static int s3fs_utimens(const char* _path, const struct timespec ts[2])
|
||||
}
|
||||
|
||||
struct timespec now;
|
||||
if(-1 == clock_gettime(static_cast<clockid_t>(CLOCK_MONOTONIC_COARSE), &now)){
|
||||
if(-1 == clock_gettime(static_cast<clockid_t>(CLOCK_REALTIME), &now)){
|
||||
abort();
|
||||
}
|
||||
#if __APPLE__
|
||||
@ -2088,7 +2088,7 @@ static int s3fs_utimens_nocopy(const char* _path, const struct timespec ts[2])
|
||||
}
|
||||
|
||||
struct timespec now;
|
||||
if(-1 == clock_gettime(static_cast<clockid_t>(CLOCK_MONOTONIC_COARSE), &now)){
|
||||
if(-1 == clock_gettime(static_cast<clockid_t>(CLOCK_REALTIME), &now)){
|
||||
abort();
|
||||
}
|
||||
#if __APPLE__
|
||||
|
Loading…
Reference in New Issue
Block a user