aboutsummaryrefslogtreecommitdiff
path: root/src/syscall
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall')
-rw-r--r--src/syscall/syscall_plan9.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/syscall/syscall_plan9.go b/src/syscall/syscall_plan9.go
index 968782008d..7a130907dd 100644
--- a/src/syscall/syscall_plan9.go
+++ b/src/syscall/syscall_plan9.go
@@ -21,6 +21,15 @@ import (
const ImplementsGetwd = true
const bitSize16 = 2
+// Errno is not used with GOOS plan9.
+//
+// It exists because because the Go 1 API contract
+// (api/go1.txt's "pkg syscall, type Errno uintptr")
+// says it exists, and so code in the ecosystem often
+// assume it exists. This lets portable code be written
+// without build-tagged files, using runtime.GOOS checks instead.
+type Errno uintptr
+
// ErrorString implements Error's String method by returning itself.
//
// ErrorString values can be tested against error values using [errors.Is].