diff options
| author | Robert Clausecker <fuz@FreeBSD.org> | 2026-07-06 14:04:48 +0000 |
|---|---|---|
| committer | Robert Clausecker <fuz@FreeBSD.org> | 2026-07-08 08:49:11 +0000 |
| commit | a359b138185ed85c15f255775cf24e04e0ef69c5 (patch) | |
| tree | b7474319d35519878ae211a8568d52435bfa6633 | |
| parent | 8ec8b8f9da420a665638cf3a223994cf19182f78 (diff) | |
sysutils/docker-compose: fix build on armv7
On armv7, syscall.Timespec and golang.org/x/sys/unix.Timespec do not
have the same members due to padding in syscall.Timespec. Work around
this difference by converting field-by-field.
Approved by: portmgr (build fix blanket)
MFH: 2026Q2
See also: https://github.com/tonistiigi/fsutil/issues/266
| -rw-r--r-- | sysutils/docker-compose/files/patch-vendor_github.com_tonistiigi_fsutil_copy_copy__unix.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sysutils/docker-compose/files/patch-vendor_github.com_tonistiigi_fsutil_copy_copy__unix.go b/sysutils/docker-compose/files/patch-vendor_github.com_tonistiigi_fsutil_copy_copy__unix.go new file mode 100644 index 000000000000..7229f810b60d --- /dev/null +++ b/sysutils/docker-compose/files/patch-vendor_github.com_tonistiigi_fsutil_copy_copy__unix.go @@ -0,0 +1,13 @@ +--- vendor/github.com/tonistiigi/fsutil/copy/copy_unix.go.orig 2026-07-06 12:19:07 UTC ++++ vendor/github.com/tonistiigi/fsutil/copy/copy_unix.go +@@ -62,7 +62,9 @@ func (c *copier) copyFileTimestamp(fi os.FileInfo, nam + } + + st := fi.Sys().(*syscall.Stat_t) +- timespec := []unix.Timespec{unix.Timespec(StatAtime(st)), unix.Timespec(StatMtime(st))} ++ atime := unix.Timespec{Sec: StatAtime(st).Sec, Nsec: StatAtime(st).Nsec} ++ mtime := unix.Timespec{Sec: StatMtime(st).Sec, Nsec: StatMtime(st).Nsec} ++ timespec := []unix.Timespec{atime, mtime} + if err := unix.UtimesNanoAt(unix.AT_FDCWD, name, timespec, unix.AT_SYMLINK_NOFOLLOW); err != nil { + return errors.Wrapf(err, "failed to utime %s", name) + } |
