When I first tried to build mainline on Solaris 11 Update 1, the libgo
build failed.  In gen-sysinfo.go, I have

type _zone_net_addr_t struct { zna_family uint16; zna_plen uint16; zna_addru 
struct { znau_addr6 _in6_addr; }; }
type _zone_net_data_t struct { zn_type int; zn_linkid uint32; zn_naddrs uint32; 
zn_addrs [0+1]_zone_net_addr_t; }

but the former is filtered out due to its use of _in6_addr, so we're
left with a reference to an undefined type.

The following patch fixes this and allowed the bootstrap to complete,
but I wonder if it wouldn't be better to globally do a

        sed -e 's/_in6_addr/[16]byte/'

instead of the current special-casing of _in6_addr in a couple of places.

        Rainer


2012-03-22  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        * mksysinfo.sh (_zone_net_addr_t): Handle _in6_addr.

# HG changeset patch
# Parent fb5daa5b2c139aa02220feb898ac29bbafb1cb00
Handle Solaris 11 Update 1 zone_net_addr_t

diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -1065,4 +1065,9 @@ grep '^type _ipv6_member_t ' gen-sysinfo
 egrep '^const _(MIB2|EXPER)_' gen-sysinfo.go | \
   sed -e 's/^\(const \)_\([^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
 
+# The Solaris 11 Update 1 _zone_net_addr_t struct.
+grep '^type _zone_net_addr_t ' gen-sysinfo.go | \
+    sed -e 's/_in6_addr/[16]byte/' \
+    >> ${OUT}
+
 exit $?
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to