1
1
openwrt/tools/squashfs4/patches/0001-fix-mksquashfs-use-st_atimespec-on-macOS.patch
Shiji Yang e69e03a49d
tools/squashfs4: update to 4.7.5
Release Note:
  https://github.com/plougher/squashfs-tools/releases/tag/4.7.5

Remove upstreamed patch:
- 0001-mksquashfs-don-t-create-duplicate-virtual-real-disk-.patch

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22249
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-03-04 00:44:09 +01:00

26 lines
930 B
Diff

From f88f4a659d6ab432a57e90fe2f6191149c6b343f Mon Sep 17 00:00:00 2001
From: Rui Chen <rui@chenrui.dev>
Date: Sun, 1 Mar 2026 22:10:34 -0500
Subject: [PATCH] fix(mksquashfs): use st_atimespec on macOS
Darwin struct stat does not expose st_atim. Use st_atimespec on macOS while keeping existing behavior on other platforms.
Signed-off-by: Rui Chen <rui@chenrui.dev>
---
squashfs-tools/mksquashfs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/squashfs-tools/mksquashfs.c
+++ b/squashfs-tools/mksquashfs.c
@@ -3372,7 +3372,9 @@ static struct inode_info *lookup_inode4(
* lazytime or relatime and the file has been created or
* modified since the last access.
*/
-#ifdef st_atime
+#ifdef __APPLE__
+ memset(&buf->st_atimespec, 0, sizeof(buf->st_atimespec));
+#elif defined(st_atime)
memset(&buf->st_atim, 0, sizeof(buf->st_atim));
#else
memset(&buf->st_atime, 0, sizeof(buf->st_atime));