LibCore: Fix build error in File.cpp on macOS

struct stat on macOS doesn't have st_atim.tv_sec and therefore broke the
Lagom build. Replacing it with st_atime fixes that.
This commit is contained in:
fladd 2021-08-18 23:09:22 +02:00 committed by Linus Groh
parent ee608f58ee
commit 1de104c6c4

View file

@ -481,8 +481,8 @@ Result<void, File::CopyError> File::copy_directory(String const& dst_path, Strin
// FIXME: Implement utimens() and use it here. // FIXME: Implement utimens() and use it here.
struct utimbuf timbuf; struct utimbuf timbuf;
timbuf.actime = src_stat.st_atim.tv_sec; timbuf.actime = src_stat.st_atime;
timbuf.modtime = src_stat.st_atim.tv_sec; timbuf.modtime = src_stat.st_atime;
if (utime(dst_path.characters(), &timbuf) < 0) if (utime(dst_path.characters(), &timbuf) < 0)
return CopyError { OSError(errno), false }; return CopyError { OSError(errno), false };
} }