internal,net,os,runtime,syscall: fixes for AIX following update to go1.9
[official-gcc.git] / libgo / go / internal / poll / sockoptip.go
blobae59b0c762729095f1e40511309e4660acb32d8f
1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // +build aix darwin dragonfly freebsd linux netbsd openbsd windows
7 package poll
9 import "syscall"
11 // SetsockoptIPMreq wraps the setsockopt network call with an IPMreq argument.
12 func (fd *FD) SetsockoptIPMreq(level, name int, mreq *syscall.IPMreq) error {
13 if err := fd.incref(); err != nil {
14 return err
16 defer fd.decref()
17 return syscall.SetsockoptIPMreq(fd.Sysfd, level, name, mreq)
20 // SetsockoptIPv6Mreq wraps the setsockopt network call with an IPv6Mreq argument.
21 func (fd *FD) SetsockoptIPv6Mreq(level, name int, mreq *syscall.IPv6Mreq) error {
22 if err := fd.incref(); err != nil {
23 return err
25 defer fd.decref()
26 return syscall.SetsockoptIPv6Mreq(fd.Sysfd, level, name, mreq)