Patchwork libgo patch committed: Update to weekly.2012-01-20

login
register
mail settings
Submitter Rainer Orth
Date Jan. 27, 2012, 12:54 p.m.
Message ID <yddobtp1f1z.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/138221/
State New
Headers show

Comments

Rainer Orth - Jan. 27, 2012, 12:54 p.m.
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> I'm also checking IRIX 6.5 right now.

IRIX does need one additional change indeed.  Without it, I get

/vol/gcc/src/hg/trunk/local/libgo/go/net/sockoptip.go:79:74: error: reference to undefined identifier 'syscall.IPV6_UNICAST_HOPS'
/vol/gcc/src/hg/trunk/local/libgo/go/net/sockoptip.go:99:74: error: reference to undefined identifier 'syscall.IPV6_MULTICAST_IF'
/vol/gcc/src/hg/trunk/local/libgo/go/net/sockoptip.go:130:74: error: reference to undefined identifier 'syscall.IPV6_MULTICAST_HOPS'
/vol/gcc/src/hg/trunk/local/libgo/go/net/sockoptip.go:150:74: error: reference to undefined identifier 'syscall.IPV6_MULTICAST_LOOP'

Fixed as follows (the comment explains why done this way).

With that patch, I can at least link libgo.so and link a trivial Go
program.  Full bootstrap with run over the weekend.

	Rainer
Ian Taylor - Jan. 27, 2012, 10:37 p.m.
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> Fixed as follows (the comment explains why done this way).
>
> With that patch, I can at least link libgo.so and link a trivial Go
> program.  Full bootstrap with run over the weekend.

Thanks.

Committed.

Ian

Patch

diff --git a/libgo/go/syscall/socket_irix.go b/libgo/go/syscall/socket_irix.go
--- a/libgo/go/syscall/socket_irix.go
+++ b/libgo/go/syscall/socket_irix.go
@@ -119,3 +119,12 @@  const (
 func anyToSockaddrOS(rsa *RawSockaddrAny) (Sockaddr, error) {
 	return nil, EAFNOSUPPORT
 }
+
+// <netinet/in.h.h> only provides IPV6_* etc. if  _NO_XOPEN4 && _NO_XOPEN5,
+// so as above simply provide them here.
+const (
+	IPV6_UNICAST_HOPS   = 48
+	IPV6_MULTICAST_IF   = IP_MULTICAST_IF
+	IPV6_MULTICAST_HOPS = IP_MULTICAST_TTL
+	IPV6_MULTICAST_LOOP = IP_MULTICAST_LOOP
+)