aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/nomad/files/patch-command_agent_log__file__bsd__386.go
blob: eb7de009e9d77e8c406130666a5f7271c1ae144c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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))
+}