mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
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:
parent
ee608f58ee
commit
1de104c6c4
1 changed files with 2 additions and 2 deletions
|
@ -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 };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue