summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/unix/syscall_solaris.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/sys/unix/syscall_solaris.go')
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_solaris.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go
index 35e5d72ba..3ab9e07c8 100644
--- a/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -166,7 +166,7 @@ func Getwd() (wd string, err error) {
func Getgroups() (gids []int, err error) {
n, err := getgroups(0, nil)
- // Check for error and sanity check group count. Newer versions of
+ // Check for error and sanity check group count. Newer versions of
// Solaris allow up to 1024 (NGROUPS_MAX).
if n < 0 || n > 1024 {
if err != nil {
@@ -350,7 +350,7 @@ func Futimesat(dirfd int, path string, tv []Timeval) error {
}
// Solaris doesn't have an futimes function because it allows NULL to be
-// specified as the path for futimesat. However, Go doesn't like
+// specified as the path for futimesat. However, Go doesn't like
// NULL-style string interfaces, so this simple wrapper is provided.
func Futimes(fd int, tv []Timeval) error {
if tv == nil {
@@ -578,6 +578,15 @@ func IoctlGetTermio(fd int, req uint) (*Termio, error) {
return &value, err
}
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ if len(fds) == 0 {
+ return poll(nil, 0, timeout)
+ }
+ return poll(&fds[0], len(fds), timeout)
+}
+
/*
* Exposed directly
*/