Skip to content

Commit

Permalink
Fix build failure on riscv64 caused by missing syscall
Browse files Browse the repository at this point in the history
On RISC-V 64-bit linux systems, syscall `dup2()` is not available, therefore
syscall.Dup2 will be undefined and gotop will fail to be built from soure.
This patch updates building target of logging/logging_{other,arm64} and
renames them based on syscall used.
  • Loading branch information
CamberLoid committed May 9, 2022
1 parent d3fc311 commit 658926b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion logging/logging_other.go → logging/logging_dup2.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build linux,!arm64 openbsd,!arm64 freebsd darwin
// +build linux,!arm64,!riscv64 openbsd,!arm64 freebsd darwin

package logging

Expand Down
2 changes: 1 addition & 1 deletion logging/logging_arm64.go → logging/logging_dup3.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !freebsd,!darwin,arm64
// +build !freebsd,!darwin,arm64 linux,riscv64

package logging

Expand Down

0 comments on commit 658926b

Please sign in to comment.