Fix build with gccgo
+ archive: don't convert syscall.Timespec to unix.Timespec archive/tar_unix.go:179:76: error: invalid type conversion (cannot use type syscall.Timespec as type unix.Timespec) 179 | timespec := []unix.Timespec{unix.Timespec(fs.StatAtime(st)), unix.Timespec(fs.StatMtime(st))} + gccgo has no plugin support https://github.com/golang/go/issues/36403 + update github.com/containerd/continuity to include same fix for Timespec Signed-off-by: Shengjing Zhu <zhsj@debian.org>
This commit is contained in:
@@ -176,7 +176,10 @@ func copyDirInfo(fi os.FileInfo, path string) error {
|
||||
return errors.Wrapf(err, "failed to chmod %s", path)
|
||||
}
|
||||
|
||||
timespec := []unix.Timespec{unix.Timespec(fs.StatAtime(st)), unix.Timespec(fs.StatMtime(st))}
|
||||
timespec := []unix.Timespec{
|
||||
unix.NsecToTimespec(syscall.TimespecToNsec(fs.StatAtime(st))),
|
||||
unix.NsecToTimespec(syscall.TimespecToNsec(fs.StatMtime(st))),
|
||||
}
|
||||
if err := unix.UtimesNanoAt(unix.AT_FDCWD, path, timespec, unix.AT_SYMLINK_NOFOLLOW); err != nil {
|
||||
return errors.Wrapf(err, "failed to utime %s", path)
|
||||
}
|
||||
|
Reference in New Issue
Block a user