From ac8856ac2ba41b23ce683c8d504e2f134e191323 Mon Sep 17 00:00:00 2001 From: Gusted Date: Fri, 9 Aug 2024 17:32:40 +0200 Subject: [PATCH] [CHORE] Fix darwin compatibility - Always convert (syscall.Stat_t).Dev to uint64. - Resolves #4905 --- modules/log/color_console_other.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/log/color_console_other.go b/modules/log/color_console_other.go index 673377fa62..c08b38c674 100644 --- a/modules/log/color_console_other.go +++ b/modules/log/color_console_other.go @@ -39,7 +39,9 @@ func fileStatDevIno(file *os.File) (uint64, uint64, bool) { return 0, 0, false } - return stat.Dev, stat.Ino, true + // Do a type conversion to uint64, because Dev isn't always uint64 + // on every operating system + architecture combination. + return uint64(stat.Dev), stat.Ino, true //nolint:unconvert } func fileIsDevIno(file *os.File, dev, ino uint64) bool {