diff --git a/.changelog/11854.txt b/.changelog/11854.txt new file mode 100644 index 000000000000..e41e2b63113f --- /dev/null +++ b/.changelog/11854.txt @@ -0,0 +1,3 @@ +```bug +freebsd: Fixed a build failure on FreeBSD ARM7 32-bit systems +``` diff --git a/command/agent/log_file_bsd.go b/command/agent/log_file_bsd.go index ae6ec23e149b..b227113287ab 100644 --- a/command/agent/log_file_bsd.go +++ b/command/agent/log_file_bsd.go @@ -12,5 +12,6 @@ import ( func (l *logFile) createTime(stat os.FileInfo) time.Time { stat_t := stat.Sys().(*syscall.Stat_t) createTime := stat_t.Ctimespec - return time.Unix(createTime.Sec, createTime.Nsec) + // Sec and Nsec are int32 in 32-bit architectures. + return time.Unix(int64(createTime.Sec), int64(createTime.Nsec)) //nolint:unconvert }