Skip to content

Commit 21b2c27

Browse files
committed
overlay gd: fix build for 32-bit ARM
This commit reverts a hunk of commit 2f5f0af ("Add unconvert linter") and adds a hint for unconvert linter to ignore excessive conversion as it is required on 32-bit platforms (e.g. armhf). The exact error on armhf is this: 19:06:45 ---> Making bundle: dynbinary (in bundles/17.06.0-dev/dynbinary) 19:06:48 Building: bundles/17.06.0-dev/dynbinary-daemon/dockerd-17.06.0-dev 19:10:58 # github.com/docker/docker/daemon/graphdriver/overlay 19:10:58 daemon/graphdriver/overlay/copy.go:161: cannot use stat.Atim.Sec (type int32) as type int64 in argument to time.Unix 19:10:58 daemon/graphdriver/overlay/copy.go:161: cannot use stat.Atim.Nsec (type int32) as type int64 in argument to time.Unix 19:10:58 daemon/graphdriver/overlay/copy.go:162: cannot use stat.Mtim.Sec (type int32) as type int64 in argument to time.Unix 19:10:58 daemon/graphdriver/overlay/copy.go:162: cannot use stat.Mtim.Nsec (type int32) as type int64 in argument to time.Unix Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent fc3040a commit 21b2c27

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

daemon/graphdriver/overlay/copy.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,10 @@ func copyDir(srcDir, dstDir string, flags copyFlags) error {
157157
}
158158

159159
// system.Chtimes doesn't support a NOFOLLOW flag atm
160+
// nolint: unconvert
160161
if !isSymlink {
161-
aTime := time.Unix(stat.Atim.Sec, stat.Atim.Nsec)
162-
mTime := time.Unix(stat.Mtim.Sec, stat.Mtim.Nsec)
162+
aTime := time.Unix(int64(stat.Atim.Sec), int64(stat.Atim.Nsec))
163+
mTime := time.Unix(int64(stat.Mtim.Sec), int64(stat.Mtim.Nsec))
163164
if err := system.Chtimes(dstPath, aTime, mTime); err != nil {
164165
return err
165166
}

0 commit comments

Comments
 (0)