diff options
author | Gunnar Beutner <gunnar@beutner.name> | 2021-04-17 09:35:46 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-17 11:12:42 +0200 |
commit | c33592d28cac46a4193c1d727f6b3a34aebea978 (patch) | |
tree | ff713e179c7d14ea769629174d94e5817a3a18a8 /Kernel/FileSystem | |
parent | e6b396c24832daf771c1b06a0daf04b898b3af13 (diff) | |
download | serenity-c33592d28cac46a4193c1d727f6b3a34aebea978.zip |
Kernel+LibC: Update struct stat to use struct timespec instead of time_t
Some programs unconditionally expect struct stat to have nanosecond support.
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r-- | Kernel/FileSystem/InodeMetadata.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Kernel/FileSystem/InodeMetadata.h b/Kernel/FileSystem/InodeMetadata.h index 9eead33719..18d093eb96 100644 --- a/Kernel/FileSystem/InodeMetadata.h +++ b/Kernel/FileSystem/InodeMetadata.h @@ -117,9 +117,12 @@ struct InodeMetadata { buffer.st_size = size; buffer.st_blksize = block_size; buffer.st_blocks = block_count; - buffer.st_atime = atime; - buffer.st_mtime = mtime; - buffer.st_ctime = ctime; + buffer.st_atim.tv_sec = atime; + buffer.st_atim.tv_nsec = 0; + buffer.st_mtim.tv_sec = mtime; + buffer.st_mtim.tv_nsec = 0; + buffer.st_ctim.tv_sec = ctime; + buffer.st_ctim.tv_nsec = 0; return KSuccess; } |