aboutsummaryrefslogtreecommitdiff
path: root/libgo/syscalls/socket.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-03-30 15:33:16 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-03-30 15:33:16 +0000
commitf72f4169133572cf62f1e872c5657cdbc4d5de2c (patch)
tree9382d76e5dc68294cdf3c4f2c03a9f61b44fb014 /libgo/syscalls/socket.go
parentf2034d064c29d9620c5562b2b5b517bdc6c7a672 (diff)
downloadgcc-f72f4169133572cf62f1e872c5657cdbc4d5de2c.zip
gcc-f72f4169133572cf62f1e872c5657cdbc4d5de2c.tar.gz
gcc-f72f4169133572cf62f1e872c5657cdbc4d5de2c.tar.bz2
Update to current Go library.
From-SVN: r171732
Diffstat (limited to 'libgo/syscalls/socket.go')
-rw-r--r--libgo/syscalls/socket.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/libgo/syscalls/socket.go b/libgo/syscalls/socket.go
index e786653..28581a5 100644
--- a/libgo/syscalls/socket.go
+++ b/libgo/syscalls/socket.go
@@ -208,6 +208,13 @@ func Listen(fd int, n int) (errno int) {
return;
}
+func GetsockoptInt(fd, level, opt int) (value, errno int) {
+ var n int32
+ vallen := Socklen_t(4)
+ errno = libc_getsockopt(fd, level, opt, (*byte)(unsafe.Pointer(&n)), &vallen)
+ return int(n), errno
+}
+
func setsockopt(fd, level, opt int, valueptr uintptr, length Socklen_t) (errno int) {
r := libc_setsockopt(fd, level, opt, (*byte)(unsafe.Pointer(valueptr)),
length);
@@ -383,5 +390,3 @@ func Shutdown(fd int, how int) (errno int) {
if r < 0 { errno = GetErrno() }
return;
}
-
-// FIXME: No getsockopt.