Hi Ian, > This patch from Tony Reix fixes the libgo configure script to > correctly decide whether netinet/icmp6.h exists on AIX. Bootstrapped > and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.
unfortunately, this patch broke Solaris bootstrap (seen on Solaris 11.4, but the headers are the same all the way back to Solaris 10): runtime_sysinfo.go:1504:32: error: use of undefined type '_mld_hdr_t' type _mld2q struct { mld2q_hdr _mld_hdr_t; mld2q_sqrv uint8; mld2q_qqic uint8; mld2q_numsrc uint16; } ^ runtime_sysinfo.go:1504:32: error: use of undefined type '_mld_hdr_t' gen-sysinfo.go has gen-sysinfo.go:type _mld_hdr_t struct { mld_icmp6_hdr _icmp6_hdr; mld_addr _in6_addr; } which is lost in sysinfo.go due to the use of _in6_addr. The solution is the same as for AIX _arpcom, and the following patch allowed an i386-pc-solaris2.11 bootstrap to finish. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University
diff --git a/libgo/mkrsysinfo.sh b/libgo/mkrsysinfo.sh --- a/libgo/mkrsysinfo.sh +++ b/libgo/mkrsysinfo.sh @@ -36,6 +36,10 @@ grep -v '^// ' gen-sysinfo.go | \ grep '^type _arpcom ' gen-sysinfo.go | \ sed -e 's/_in6_addr/[16]byte/' >> ${OUT} +# Same on Solaris for _mld_hdr_t. +grep '^type _mld_hdr_t ' gen-sysinfo.go | \ + sed -e 's/_in6_addr/[16]byte/' >> ${OUT} + # The time structures need special handling: we need to name the # types, so that we can cast integers to the right types when # assigning to the structures. diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -48,6 +48,10 @@ grep -v '^// ' gen-sysinfo.go | \ grep '^type _arpcom ' gen-sysinfo.go | \ sed -e 's/_in6_addr/[16]byte/' >> ${OUT} +# Same on Solaris for _mld_hdr_t. +grep '^type _mld_hdr_t ' gen-sysinfo.go | \ + sed -e 's/_in6_addr/[16]byte/' >> ${OUT} + # The errno constants. These get type Errno. egrep '#define E[A-Z0-9_]+ ' errno.i | \ sed -e 's/^#define \(E[A-Z0-9_]*\) .*$/const \1 = Errno(_\1)/' >> ${OUT}