From b84192550dd515a5ffc8c15f75ff89d49ca75d14 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sun, 1 Oct 2023 10:53:02 +0000 Subject: [PATCH 1/2] tcp: fix build on riscv64 --- p2p/transport/tcp/metrics.go | 2 +- p2p/transport/tcp/metrics_general.go | 2 +- p2p/transport/tcp/{metrics_windows.go => metrics_none.go} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename p2p/transport/tcp/{metrics_windows.go => metrics_none.go} (88%) diff --git a/p2p/transport/tcp/metrics.go b/p2p/transport/tcp/metrics.go index fc2add49bd..8e7308f3ad 100644 --- a/p2p/transport/tcp/metrics.go +++ b/p2p/transport/tcp/metrics.go @@ -1,4 +1,4 @@ -//go:build !windows +//go:build !windows && !riscv64 package tcp diff --git a/p2p/transport/tcp/metrics_general.go b/p2p/transport/tcp/metrics_general.go index 6b67283448..e9868609f3 100644 --- a/p2p/transport/tcp/metrics_general.go +++ b/p2p/transport/tcp/metrics_general.go @@ -1,4 +1,4 @@ -//go:build !linux && !darwin && !windows +//go:build !linux && !darwin && !windows && !riscv64 package tcp diff --git a/p2p/transport/tcp/metrics_windows.go b/p2p/transport/tcp/metrics_none.go similarity index 88% rename from p2p/transport/tcp/metrics_windows.go rename to p2p/transport/tcp/metrics_none.go index 7142e7dbe3..4ec248d411 100644 --- a/p2p/transport/tcp/metrics_windows.go +++ b/p2p/transport/tcp/metrics_none.go @@ -1,4 +1,4 @@ -//go:build windows +//go:build windows || riscv64 package tcp From 6c37b37bba97b07a5cc428b2c65e468102e408ae Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 16 Oct 2023 21:50:33 -0700 Subject: [PATCH 2/2] explain why riscv64 doesn't work Co-authored-by: Jorropo --- p2p/transport/tcp/metrics_none.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/p2p/transport/tcp/metrics_none.go b/p2p/transport/tcp/metrics_none.go index 4ec248d411..01cf3e9c5c 100644 --- a/p2p/transport/tcp/metrics_none.go +++ b/p2p/transport/tcp/metrics_none.go @@ -1,3 +1,5 @@ +// riscv64 see: https://github.com/marten-seemann/tcp/pull/1 + //go:build windows || riscv64 package tcp