Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcp: fix build on riscv64 #2590

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion p2p/transport/tcp/metrics.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build !windows
//go:build !windows && !riscv64

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//go:build !windows && !riscv64
// riscv64 see: https://github.com/marten-seemann/tcp/pull/1
//go:build !windows && !riscv64

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this works? Doesn't the go:build need to come first?

Copy link
Contributor

@Jorropo Jorropo Oct 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, go:build line has to come before package:

> cat a.go 
// test

//go:build doNotBuild

package aaa

const "test" + 42
> cat b.go 
package aaa

func A() {}
> go build .
> echo $status
0

package tcp

Expand Down
2 changes: 1 addition & 1 deletion p2p/transport/tcp/metrics_general.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build !linux && !darwin && !windows
//go:build !linux && !darwin && !windows && !riscv64

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//go:build !linux && !darwin && !windows && !riscv64
// riscv64 see: https://github.com/marten-seemann/tcp/pull/1
//go:build !linux && !darwin && !windows && !riscv64

package tcp

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build windows
//go:build windows || riscv64

marten-seemann marked this conversation as resolved.
Show resolved Hide resolved
package tcp

Expand Down
Loading