1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-27 05:10:36 +00:00

sysutils/nomad: fixes for i386

This commit is contained in:
John Hixson 2021-12-14 20:02:00 -08:00
parent 28d96f0b9e
commit 1978b2196c
4 changed files with 32 additions and 2 deletions

View File

@ -1,6 +1,7 @@
PORTNAME= nomad
DISTVERSIONPREFIX= v
DISTVERSION= 1.2.2
PORTREVISION= 1
CATEGORIES= sysutils
MAINTAINER= jhixson@FreeBSD.org

View File

@ -1,6 +1,6 @@
--- command/agent/host/unix.go.orig 2020-07-08 22:29:33 UTC
--- command/agent/host/unix.go.orig 2021-11-24 18:54:06 UTC
+++ command/agent/host/unix.go
@@ -64,5 +64,5 @@ func (d *df) total() uint64 {
@@ -65,5 +65,5 @@ func (d *df) total() uint64 {
}
func (d *df) available() uint64 {

View File

@ -0,0 +1,9 @@
--- command/agent/log_file_bsd.go.orig 2021-11-24 18:54:06 UTC
+++ command/agent/log_file_bsd.go
@@ -1,4 +1,5 @@
-//go:build darwin || freebsd || netbsd || openbsd
+//go:build !386 && (darwin || freebsd || netbsd || openbsd)
+// +build !386
// +build darwin freebsd netbsd openbsd
package agent

View File

@ -0,0 +1,20 @@
--- command/agent/log_file_bsd_386.go.orig 2021-12-15 03:59:45 UTC
+++ command/agent/log_file_bsd_386.go
@@ -0,0 +1,17 @@
+//go:build 386 && (darwin || freebsd || netbsd || openbsd)
+// +build 386
+// +build darwin freebsd netbsd openbsd
+
+package agent
+
+import (
+ "os"
+ "syscall"
+ "time"
+)
+
+func (l *logFile) createTime(stat os.FileInfo) time.Time {
+ stat_t := stat.Sys().(*syscall.Stat_t)
+ createTime := stat_t.Ctimespec
+ return time.Unix(int64(createTime.Sec), int64(createTime.Nsec))
+}