Skip to content

Commit 9c214ed

Browse files
committed
use golang.org/x/sys/unix for dup2
fixes build on arm64 Signed-off-by: Benjamin Elder <[email protected]>
1 parent cc76b10 commit 9c214ed

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fifo.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"syscall"
2626

2727
"github.com/pkg/errors"
28+
"golang.org/x/sys/unix"
2829
)
2930

3031
type fifo struct {
@@ -48,7 +49,7 @@ func OpenFifoDup2(ctx context.Context, fn string, flag int, perm os.FileMode, fd
4849
return nil, errors.Wrap(err, "fifo error")
4950
}
5051

51-
if err := syscall.Dup2(int(f.file.Fd()), fd); err != nil {
52+
if err := unix.Dup2(int(f.file.Fd()), fd); err != nil {
5253
_ = f.Close()
5354
return nil, errors.Wrap(err, "dup2 error")
5455
}

0 commit comments

Comments
 (0)