File: fix-ftbfs-32bit-system.patch

package info (click to toggle)
golang-android-soong 0.0~git20201014.17e97d9-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 7,680 kB
  • sloc: python: 3,000; sh: 1,780; cpp: 66; makefile: 5
file content (31 lines) | stat: -rw-r--r-- 1,150 bytes parent folder | download
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
29
30
31
--- a/finder/fs/fs.go
+++ b/finder/fs/fs.go
@@ -510,7 +510,7 @@ func (m *MockFs) InodeNumber(info os.FileInfo) (number uint64, err error) {
 func (m *MockFs) DeviceNumber(info os.FileInfo) (number uint64, err error) {
 	mockInfo, ok := info.(*mockFileInfo)
 	if ok {
-		return mockInfo.deviceNumber, nil
+		return uint64(mockInfo.deviceNumber), nil
 	}
 	return 0, fmt.Errorf("%v is not a mockFileInfo", info)
 }
--- a/finder/fs/fs_linux.go
+++ b/finder/fs/fs_linux.go
@@ -34,7 +34,7 @@ func (osFs) DeviceNumber(info os.FileInfo) (number uint64, err error) {
 	sys := info.Sys()
 	linuxStats, ok := sys.(*syscall.Stat_t)
 	if ok {
-		return linuxStats.Dev, nil
+		return uint64(linuxStats.Dev), nil
 	}
 	return 0, fmt.Errorf("%v is not a *syscall.Stat_t", sys)
 }
@@ -43,7 +43,7 @@ func (osFs) PermTime(info os.FileInfo) (when time.Time, err error) {
 	sys := info.Sys()
 	linuxStats, ok := sys.(*syscall.Stat_t)
 	if ok {
-		return time.Unix(linuxStats.Ctim.Sec, linuxStats.Ctim.Nsec), nil
+		return time.Unix(int64(linuxStats.Ctim.Sec), int64(linuxStats.Ctim.Nsec)), nil
 	}
 	return time.Time{}, fmt.Errorf("%v is not a *syscall.Stat_t", sys)
 }