summaryrefslogtreecommitdiffhomepage
path: root/conn/net_err_closed.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-01-20 20:04:31 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-01-20 20:12:32 +0100
commit294d3bedf959c9c496aaa877919a762acf07c684 (patch)
tree7a8b17097052e46d558511e85c0d392bfa571f01 /conn/net_err_closed.go
parent86a58b51c027feb3bf8836359fb3adf1c436c53d (diff)
device: allow compiling with Go 1.15
Until we depend on Go 1.16 (which isn't released yet), alias our own variable to the private member of the net package. This will allow an easy find replace to make this go away when we eventually switch to 1.16. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'conn/net_err_closed.go')
-rw-r--r--conn/net_err_closed.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/conn/net_err_closed.go b/conn/net_err_closed.go
new file mode 100644
index 0000000..e4dcfae
--- /dev/null
+++ b/conn/net_err_closed.go
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: MIT
+ *
+ * Copyright (C) 2021 WireGuard LLC. All Rights Reserved.
+ */
+
+package conn
+
+import _ "unsafe"
+
+//TODO: replace this with net.ErrClosed for Go 1.16
+
+//go:linkname NetErrClosed internal/poll.ErrNetClosing
+var NetErrClosed error