From 1e59a0a92689469794ea1216536de52018f1336f Mon Sep 17 00:00:00 2001 From: Nicholas Corin Date: Mon, 12 Apr 2021 08:47:11 +0200 Subject: [PATCH] logging: Use dup(2) syscall on darwin --- logging/logging_arm64.go | 2 +- logging/logging_other.go | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/logging/logging_arm64.go b/logging/logging_arm64.go index b88c479..9d62f0f 100644 --- a/logging/logging_arm64.go +++ b/logging/logging_arm64.go @@ -1,4 +1,4 @@ -// +build !freebsd,arm64 +// +build !freebsd,!darwin,arm64 package logging diff --git a/logging/logging_other.go b/logging/logging_other.go index e910821..d7d75d5 100644 --- a/logging/logging_other.go +++ b/logging/logging_other.go @@ -1,9 +1,11 @@ -// +build linux,!arm64 openbsd,!arm64 freebsd darwin,!arm64 +// +build linux,!arm64 openbsd,!arm64 freebsd darwin package logging -import "syscall" -import "os" +import ( + "os" + "syscall" +) func stderrToLogfile(logfile *os.File) { syscall.Dup2(int(logfile.Fd()), 2)