Skip to content

Commit 62ef0ff

Browse files
authored
Merge pull request #165 from zhsj/fix-arm64
Fix building on arm64
2 parents 04c754f + 25269ef commit 62ef0ff

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
name: CI Tests
3131
runs-on: ${{ matrix.os }}
3232
timeout-minutes: 10
33-
needs: [checks]
33+
needs: [project]
3434

3535
strategy:
3636
matrix:

fs/du_unix.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ func diskUsage(ctx context.Context, roots ...string) (Usage, error) {
6363
inoKey := newInode(stat)
6464
if _, ok := inodes[inoKey]; !ok {
6565
inodes[inoKey] = struct{}{}
66-
size += stat.Blocks * stat.Blksize
66+
// on arm64 stat.Blksize is int32
67+
size += stat.Blocks * int64(stat.Blksize) // nolint: unconvert
6768
}
6869

6970
return nil
@@ -94,7 +95,8 @@ func diffUsage(ctx context.Context, a, b string) (Usage, error) {
9495
inoKey := newInode(stat)
9596
if _, ok := inodes[inoKey]; !ok {
9697
inodes[inoKey] = struct{}{}
97-
size += stat.Blocks * stat.Blksize
98+
// on arm64 stat.Blksize is int32
99+
size += stat.Blocks * int64(stat.Blksize) // nolint: unconvert
98100
}
99101

100102
return nil

0 commit comments

Comments
 (0)