Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Jul 2022 16:06:53 GMT
From:      Dmitri Goutnik <dmgk@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 9cb58b7c9443 - main - www/minio: Unbreak on i386
Message-ID:  <202207171606.26HG6rL8094514@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dmgk:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9cb58b7c9443ff7492f9f8960bf6cf75ccc19514

commit 9cb58b7c9443ff7492f9f8960bf6cf75ccc19514
Author:     Dmitri Goutnik <dmgk@FreeBSD.org>
AuthorDate: 2022-07-17 15:54:41 +0000
Commit:     Dmitri Goutnik <dmgk@FreeBSD.org>
CommitDate: 2022-07-17 16:00:43 +0000

    www/minio: Unbreak on i386
    
    vendor/github.com/minio/mc/pkg/disk/stat_freebsd.go:38:41: cannot use st.Atimespec.Sec (variable of type int32) as type int64 in argument to strconv.FormatInt
    vendor/github.com/minio/mc/pkg/disk/stat_freebsd.go:38:89: cannot use st.Atimespec.Nsec (variable of type int32) as type int64 in argument to strconv.FormatInt
    vendor/github.com/minio/mc/pkg/disk/stat_freebsd.go:51:41: cannot use st.Mtimespec.Sec (variable of type int32) as type int64 in argument to strconv.FormatInt
    vendor/github.com/minio/mc/pkg/disk/stat_freebsd.go:51:89: cannot use st.Mtimespec.Nsec (variable of type int32) as type int64 in argument to strconv.FormatInt
    
    Convert syscall.Timespec fields to int64 on all archs.
    
    Reported by:    fallout
    Approved by:    portmgr (blanket, build fix)
---
 ...dor_github.com_minio_mc_pkg_disk_stat__freebsd.go | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/www/minio/files/patch-vendor_github.com_minio_mc_pkg_disk_stat__freebsd.go b/www/minio/files/patch-vendor_github.com_minio_mc_pkg_disk_stat__freebsd.go
new file mode 100644
index 000000000000..2457ee4623c9
--- /dev/null
+++ b/www/minio/files/patch-vendor_github.com_minio_mc_pkg_disk_stat__freebsd.go
@@ -0,0 +1,20 @@
+--- vendor/github.com/minio/mc/pkg/disk/stat_freebsd.go.orig	2022-07-17 15:41:36 UTC
++++ vendor/github.com/minio/mc/pkg/disk/stat_freebsd.go
+@@ -35,7 +35,7 @@ func GetFileSystemAttrs(file string) (string, error) {
+ 
+ 	var fileAttr strings.Builder
+ 	fileAttr.WriteString("atime:")
+-	fileAttr.WriteString(strconv.FormatInt(st.Atimespec.Sec, 10) + "#" + strconv.FormatInt(st.Atimespec.Nsec, 10))
++	fileAttr.WriteString(strconv.FormatInt(int64(st.Atimespec.Sec), 10) + "#" + strconv.FormatInt(int64(st.Atimespec.Nsec), 10))
+ 	fileAttr.WriteString("/gid:")
+ 	fileAttr.WriteString(strconv.Itoa(int(st.Gid)))
+ 
+@@ -48,7 +48,7 @@ func GetFileSystemAttrs(file string) (string, error) {
+ 	fileAttr.WriteString("/mode:")
+ 	fileAttr.WriteString(strconv.Itoa(int(st.Mode)))
+ 	fileAttr.WriteString("/mtime:")
+-	fileAttr.WriteString(strconv.FormatInt(st.Mtimespec.Sec, 10) + "#" + strconv.FormatInt(st.Mtimespec.Nsec, 10))
++	fileAttr.WriteString(strconv.FormatInt(int64(st.Mtimespec.Sec), 10) + "#" + strconv.FormatInt(int64(st.Mtimespec.Nsec), 10))
+ 	fileAttr.WriteString("/uid:")
+ 	fileAttr.WriteString(strconv.Itoa(int(st.Uid)))
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207171606.26HG6rL8094514>