Skip to content

Commit

Permalink
solaris
Browse files Browse the repository at this point in the history
  • Loading branch information
absolutelightning committed Sep 1, 2023
1 parent 1ca8943 commit 2e3332a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logging/logfile_linux.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build dragonfly || linux || solaris
// +build dragonfly linux solaris
//go:build dragonfly || linux
// +build dragonfly linux

package logging

Expand Down
17 changes: 17 additions & 0 deletions logging/logfile_solaris.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//go:build solaris
// +build solaris

package logging

import (
"os"
"syscall"
"time"
)

func (l *LogFile) createTime(stat os.FileInfo) time.Time {
stat_t := stat.Sys().(*syscall.Stat_t)
createTime := stat_t.Ctim
// Sec and Nsec are int32 in 32-bit architectures.
return time.Unix(int64(createTime.Sec), int64(createTime.Nsec)) //nolint:unconvert
}

0 comments on commit 2e3332a

Please sign in to comment.