-
-
Notifications
You must be signed in to change notification settings - Fork 650
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
solve the undefined: unix.Dup2 compile error on mips64le (#680)
error in detail: go build ../internal/remote/output_interceptor_unix.go:41:2: undefined: unix.Dup2 ../internal/remote/output_interceptor_unix.go:42:2: undefined: unix.Dup2 there is Dup2 syscall on linux/amd64, linux/mips64le is Dup3 instead. Signed-off-by: Xiaodong Liu <liuxiaodong@loongson.cn>
- Loading branch information
1 parent
6321024
commit 0624f75
Showing
9 changed files
with
92 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// +build darwin | ||
|
||
package remote | ||
|
||
import ( | ||
"golang.org/x/sys/unix" | ||
) | ||
|
||
func interceptorDupx(oldfd int, newfd int) { | ||
unix.Dup2(oldfd, newfd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// +build dragonfly | ||
|
||
package remote | ||
|
||
import ( | ||
"golang.org/x/sys/unix" | ||
) | ||
|
||
func interceptorDupx(oldfd int, newfd int) { | ||
unix.Dup2(oldfd, newfd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// +build freebsd | ||
|
||
package remote | ||
|
||
import ( | ||
"golang.org/x/sys/unix" | ||
) | ||
|
||
func interceptorDupx(oldfd int, newfd int) { | ||
unix.Dup2(oldfd, newfd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// +build linux | ||
// +build !mips64le | ||
|
||
package remote | ||
|
||
import ( | ||
"golang.org/x/sys/unix" | ||
) | ||
|
||
func interceptorDupx(oldfd int, newfd int) { | ||
unix.Dup2(oldfd, newfd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// +build linux | ||
// +build mips64le | ||
|
||
package remote | ||
|
||
import ( | ||
"golang.org/x/sys/unix" | ||
) | ||
|
||
func interceptorDupx(oldfd int, newfd int) { | ||
unix.Dup3(oldfd, newfd, 0) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// +build netbsd | ||
|
||
package remote | ||
|
||
import ( | ||
"golang.org/x/sys/unix" | ||
) | ||
|
||
func interceptorDupx(oldfd int, newfd int) { | ||
unix.Dup2(oldfd, newfd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// +build openbsd | ||
|
||
package remote | ||
|
||
import ( | ||
"golang.org/x/sys/unix" | ||
) | ||
|
||
func interceptorDupx(oldfd int, newfd int) { | ||
unix.Dup2(oldfd, newfd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// +build solaris | ||
|
||
package remote | ||
|
||
import ( | ||
"golang.org/x/sys/unix" | ||
) | ||
|
||
func interceptorDupx(oldfd int, newfd int) { | ||
unix.Dup2(oldfd, newfd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters