diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-09-15 22:57:23 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-09-15 22:57:23 +0000 |
commit | d00f9deb0238e215423667de62189a1ce954243a (patch) | |
tree | 48e999f1ed5e79d577fad8bb55b5633d53420e23 /libgo/go | |
parent | 7fdaa1f0b873b79ee87ad910b0da8e4c5f194cb0 (diff) | |
download | gcc-d00f9deb0238e215423667de62189a1ce954243a.zip gcc-d00f9deb0238e215423667de62189a1ce954243a.tar.gz gcc-d00f9deb0238e215423667de62189a1ce954243a.tar.bz2 |
syscall: fixes for Solaris
Patch by Rainer Orth.
Reviewed-on: https://go-review.googlesource.com/64170
From-SVN: r252866
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/golang_org/x/net/lif/link.go | 2 | ||||
-rw-r--r-- | libgo/go/syscall/forkpipe_bsd.go | 2 | ||||
-rw-r--r-- | libgo/go/syscall/libcall_solaris.go | 12 |
3 files changed, 14 insertions, 2 deletions
diff --git a/libgo/go/golang_org/x/net/lif/link.go b/libgo/go/golang_org/x/net/lif/link.go index 70e0262..912472f 100644 --- a/libgo/go/golang_org/x/net/lif/link.go +++ b/libgo/go/golang_org/x/net/lif/link.go @@ -70,7 +70,7 @@ func Links(af int, name string) ([]Link, error) { func links(eps []endpoint, name string) ([]Link, error) { var lls []Link - lifn := lifnum{Flags: sysLIFC_NOXMIT | sysLIFC_TEMPORARY | sysLIFC_ALLZONES | sysLIFC_UNDER_IPMP} + lifn := sysLifnum{Flags: sysLIFC_NOXMIT | sysLIFC_TEMPORARY | sysLIFC_ALLZONES | sysLIFC_UNDER_IPMP} lifc := lifconf{Flags: sysLIFC_NOXMIT | sysLIFC_TEMPORARY | sysLIFC_ALLZONES | sysLIFC_UNDER_IPMP} for _, ep := range eps { lifn.Family = uint16(ep.af) diff --git a/libgo/go/syscall/forkpipe_bsd.go b/libgo/go/syscall/forkpipe_bsd.go index d418072..28897bf 100644 --- a/libgo/go/syscall/forkpipe_bsd.go +++ b/libgo/go/syscall/forkpipe_bsd.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin dragonfly netbsd openbsd +// +build darwin dragonfly netbsd openbsd solaris package syscall diff --git a/libgo/go/syscall/libcall_solaris.go b/libgo/go/syscall/libcall_solaris.go new file mode 100644 index 0000000..a026614 --- /dev/null +++ b/libgo/go/syscall/libcall_solaris.go @@ -0,0 +1,12 @@ +// Copyright 2017 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 + +//sys Getdents(fd int, buf []byte) (n int, err error) +//getdents(fd _C_int, buf *byte, nbyte Size_t) _C_int + +func ReadDirent(fd int, buf []byte) (n int, err error) { + return Getdents(fd, buf) +} |