From de0239375a9274a2af2e721f795bf8377eaa82ce Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 13 Feb 2020 23:56:39 -0800 Subject: [PATCH] logtail/filch: use x/sys/unix instead of syscall. In particular, the Dup2 syscall is not defined in the syscall package on arm64, but is defined in x/sys/unix. Signed-off-by: David Anderson --- logtail/filch/filch_unix.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/logtail/filch/filch_unix.go b/logtail/filch/filch_unix.go index aadf66986..a1e081add 100644 --- a/logtail/filch/filch_unix.go +++ b/logtail/filch/filch_unix.go @@ -8,11 +8,12 @@ package filch import ( "os" - "syscall" + + "golang.org/x/sys/unix" ) func saveStderr() (*os.File, error) { - fd, err := syscall.Dup(stderrFD) + fd, err := unix.Dup(stderrFD) if err != nil { return nil, err } @@ -26,5 +27,5 @@ func unsaveStderr(f *os.File) error { } func dup2Stderr(f *os.File) error { - return syscall.Dup2(int(f.Fd()), stderrFD) + return unix.Dup2(int(f.Fd()), stderrFD) }