Development discussion of WireGuard
 help / color / mirror / Atom feed
* [PATCH wireguard-go] tun: make operateonfd.go build tags more specific
@ 2021-09-23 10:07 Tobias Klauser
  2021-09-23 15:54 ` Jason A. Donenfeld
  0 siblings, 1 reply; 3+ messages in thread
From: Tobias Klauser @ 2021-09-23 10:07 UTC (permalink / raw)
  To: wireguard

(*NativeTun).operateOnFd is only used on darwin and freebsd. Adjust the
build tags accordingly.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 tun/operateonfd.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tun/operateonfd.go b/tun/operateonfd.go
index aab71161f27c..bc804539169f 100644
--- a/tun/operateonfd.go
+++ b/tun/operateonfd.go
@@ -1,5 +1,5 @@
-//go:build !windows
-// +build !windows
+//go:build darwin || freebsd
+// +build darwin freebsd
 
 /* SPDX-License-Identifier: MIT
  *
-- 
2.33.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH wireguard-go] tun: make operateonfd.go build tags more specific
  2021-09-23 10:07 [PATCH wireguard-go] tun: make operateonfd.go build tags more specific Tobias Klauser
@ 2021-09-23 15:54 ` Jason A. Donenfeld
  2021-09-24  8:40   ` Tobias Klauser
  0 siblings, 1 reply; 3+ messages in thread
From: Jason A. Donenfeld @ 2021-09-23 15:54 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: WireGuard mailing list

I've applied this. Thanks for the patch. Though I do wonder: it's
functionally the same as before, right? What instances lead to this
being an issue? Or did this way just seem more correct?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH wireguard-go] tun: make operateonfd.go build tags more specific
  2021-09-23 15:54 ` Jason A. Donenfeld
@ 2021-09-24  8:40   ` Tobias Klauser
  0 siblings, 0 replies; 3+ messages in thread
From: Tobias Klauser @ 2021-09-24  8:40 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

On 2021-09-23 at 17:54:59 +0200, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> I've applied this. Thanks for the patch. Though I do wonder: it's
> functionally the same as before, right? What instances lead to this
> being an issue? Or did this way just seem more correct?

Thanks. Functionally it's the same, yes. I noticed this when running
staticcheck against wireguard-go on Linux and it reported
(*NativeTun).operateOnFd as being defined but not used. So it just
seemed more correct to only define it for platforms that actually use
it.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-24  8:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 10:07 [PATCH wireguard-go] tun: make operateonfd.go build tags more specific Tobias Klauser
2021-09-23 15:54 ` Jason A. Donenfeld
2021-09-24  8:40   ` Tobias Klauser

Development discussion of WireGuard

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.vuxu.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://inbox.vuxu.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git