git: 42dc702796d4 - 2022Q3 - www/minio: Unbreak on i386
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 17 Jul 2022 16:15:28 UTC
The branch 2022Q3 has been updated by dmgk:
URL: https://cgit.FreeBSD.org/ports/commit/?id=42dc702796d47d9c7aa44edc155377314d289515
commit 42dc702796d47d9c7aa44edc155377314d289515
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:07:39 +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)
(cherry picked from commit 9cb58b7c9443ff7492f9f8960bf6cf75ccc19514)
---
...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)))
+