From 4d80de899a4f9a8981c169ec1b789e447d63bceb Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 15 Mar 2021 06:02:09 -0700 Subject: [PATCH] fix: mips 32bit compilation issue (#11775) fixes #11768 --- buildscripts/cross-compile.sh | 2 +- pkg/disk/stat_linux.go | 2 +- pkg/sys/stats_linux.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/buildscripts/cross-compile.sh b/buildscripts/cross-compile.sh index d94e10ddb..14cec1a05 100755 --- a/buildscripts/cross-compile.sh +++ b/buildscripts/cross-compile.sh @@ -9,7 +9,7 @@ function _init() { export CGO_ENABLED=0 ## List of architectures and OS to test coss compilation. - SUPPORTED_OSARCH="linux/ppc64le linux/mips64 linux/arm64 linux/s390x darwin/arm64 darwin/amd64 freebsd/amd64 windows/amd64 linux/arm linux/386 netbsd/amd64" + SUPPORTED_OSARCH="linux/ppc64le linux/mips64 linux/arm64 linux/s390x darwin/arm64 darwin/amd64 freebsd/amd64 windows/amd64 linux/arm linux/386 netbsd/amd64 linux/mips" } function _build() { diff --git a/pkg/disk/stat_linux.go b/pkg/disk/stat_linux.go index d9b5ab86c..a28d3322c 100644 --- a/pkg/disk/stat_linux.go +++ b/pkg/disk/stat_linux.go @@ -36,7 +36,7 @@ func GetInfo(path string) (info Info, err error) { Free: uint64(s.Frsize) * s.Bavail, Files: s.Files, Ffree: s.Ffree, - FSType: getFSType(s.Type), + FSType: getFSType(int64(s.Type)), } // Check for overflows. // https://github.com/minio/minio/issues/8035 diff --git a/pkg/sys/stats_linux.go b/pkg/sys/stats_linux.go index d3c0ed6ca..f88f6f619 100644 --- a/pkg/sys/stats_linux.go +++ b/pkg/sys/stats_linux.go @@ -69,7 +69,7 @@ func getSysinfoMemoryLimit() (limit uint64, err error) { // Total RAM is always the multiplicative value // of unit size and total ram. - return uint64(unit) * totalRAM, nil + return uint64(unit) * uint64(totalRAM), nil } // GetStats - return system statistics, currently only