diff options
Diffstat (limited to 'src/pkg/syscall/syscall_unix.go')
-rw-r--r-- | src/pkg/syscall/syscall_unix.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pkg/syscall/syscall_unix.go b/src/pkg/syscall/syscall_unix.go new file mode 100644 index 000000000..a32c275d5 --- /dev/null +++ b/src/pkg/syscall/syscall_unix.go @@ -0,0 +1,12 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package syscall + +func Errstr(errno int) string { + if errno < 0 || errno >= int(len(errors)) { + return "error " + str(errno) + } + return errors[errno] +} |