From 1de104c6c46e4aea05bb77c793c0357acfe73a84 Mon Sep 17 00:00:00 2001 From: fladd Date: Wed, 18 Aug 2021 23:09:22 +0200 Subject: [PATCH] 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. --- Userland/Libraries/LibCore/File.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibCore/File.cpp b/Userland/Libraries/LibCore/File.cpp index dc2fbdf816088e..24f707d07ceacd 100644 --- a/Userland/Libraries/LibCore/File.cpp +++ b/Userland/Libraries/LibCore/File.cpp @@ -481,8 +481,8 @@ Result File::copy_directory(String const& dst_path, Strin // FIXME: Implement utimens() and use it here. struct utimbuf timbuf; - timbuf.actime = src_stat.st_atim.tv_sec; - timbuf.modtime = src_stat.st_atim.tv_sec; + timbuf.actime = src_stat.st_atime; + timbuf.modtime = src_stat.st_atime; if (utime(dst_path.characters(), &timbuf) < 0) return CopyError { OSError(errno), false }; }