-
Notifications
You must be signed in to change notification settings - Fork 224
/
mips64le.patch
28 lines (25 loc) · 1.26 KB
/
mips64le.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: fix build on mips64le
Forwarded: no (but probably should)
# pkg/mod/github.com/moby/[email protected]/snapshot/diffapply_unix.go:131:8: cannot use stat.Dev (variable of type uint32) as uint64 value in struct literal
# pkg/mod/github.com/moby/[email protected]/snapshot/diffapply_unix.go:300:12: cannot use unix.Mkdev(0, 0) (value of type uint64) as uint32 value in struct literal
diff --git a/snapshot/diffapply_unix.go b/snapshot/diffapply_unix.go
index c4875000e..1d9d09d8f 100644
--- a/snapshot/diffapply_unix.go
+++ b/snapshot/diffapply_unix.go
@@ -128,7 +128,7 @@ func statInode(stat *syscall.Stat_t) inode {
}
return inode{
ino: stat.Ino,
- dev: stat.Dev,
+ dev: uint64(stat.Dev), // TODO figure out the "correct" solution for mips64le (where "stat.Dev" is a uint32)
}
}
@@ -297,7 +297,7 @@ func (a *applier) applyDelete(ctx context.Context, ca *changeApply) (bool, error
if ca.srcStat == nil {
ca.srcStat = &syscall.Stat_t{
Mode: syscall.S_IFCHR,
- Rdev: unix.Mkdev(0, 0),
+ Rdev: 0, // TODO figure out the "correct" solution for mips64le (where "stat.Dev" is a uint32, but "unix.Mkdev" always returns uint64...); https://cs.opensource.google/go/x/sys/+/refs/tags/v0.10.0:unix/dev_linux.go;l=36
}
ca.srcPath = ""
}