syscall: define no-op Errno type on plan9

Go's api/go1.txt's has line "pkg syscall, type Errno uintptr",
suggesting people should assume this type always exists. It does
for GOOS=js GOARCH=wasm too, which was also added later.

Adding this here lets portable code be written without build-tagged
files, using runtime.GOOS checks instead.

Change-Id: I785a19ec104d2ac34b55a96b5a342bcc33712961
Reviewed-on: https://go-review.googlesource.com/c/go/+/750680
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: David Chase <drchase@google.com>
diff --git a/src/syscall/syscall_plan9.go b/src/syscall/syscall_plan9.go
index 9687820..7a13090 100644
--- a/src/syscall/syscall_plan9.go
+++ b/src/syscall/syscall_plan9.go
@@ -21,6 +21,15 @@
 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].