diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-06 19:49:01 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-06 19:49:01 +0000 |
commit | 0ce10ea1348e9afd5d0eec6bca986bfe58bac5ac (patch) | |
tree | 39530b071991b2326f881b2a30a2d82d6c133fd6 /libgo/mksysinfo.sh | |
parent | 57a8bf1b0c6057ccbacb0cf79eb84d1985c2c1fe (diff) |
libgo: Update to October 24 version of master library.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204466 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/mksysinfo.sh')
-rwxr-xr-x | libgo/mksysinfo.sh | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index 71c328627a6c..a1713df9b572 100755 --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -160,6 +160,9 @@ cat > sysinfo.c <<EOF #if defined(HAVE_SYS_INOTIFY_H) #include <sys/inotify.h> #endif +#if defined(HAVE_NETINET_ICMP6_H) +#include <netinet/icmp6.h> +#endif /* Constants that may only be defined as expressions on some systems, expressions too complex for -fdump-go-spec to handle. These are @@ -709,6 +712,18 @@ if ! grep 'type IPMreqn ' ${OUT} >/dev/null 2>&1; then echo 'type IPMreqn struct { Multiaddr [4]byte; Interface [4]byte; Ifindex int32 }' >> ${OUT} fi +# The icmp6_filter struct. +grep '^type _icmp6_filter ' gen-sysinfo.go | \ + sed -e 's/_icmp6_filter/ICMPv6Filter/' \ + -e 's/data/Data/' \ + -e 's/filt/Filt/' \ + >> ${OUT} + +# We need ICMPv6Filter to compile the syscall package. +if ! grep 'type ICMPv6Filter ' ${OUT} > /dev/null 2>&1; then + echo 'type ICMPv6Filter struct { Data [8]uint32 }' >> ${OUT} +fi + # Try to guess the type to use for fd_set. fd_set=`grep '^type _fd_set ' gen-sysinfo.go || true` fds_bits_type="_C_long" @@ -1121,7 +1136,8 @@ set cmsghdr Cmsghdr ip_mreq IPMreq ip_mreqn IPMreqn ipv6_mreq IPv6Mreq \ in6_pktinfo Inet6Pktinfo inotify_event InotifyEvent linger Linger \ msghdr Msghdr nlattr NlAttr nlmsgerr NlMsgerr nlmsghdr NlMsghdr \ rtattr RtAttr rtgenmsg RtGenmsg rtmsg RtMsg rtnexthop RtNexthop \ - sock_filter SockFilter sock_fprog SockFprog ucred Ucred + sock_filter SockFilter sock_fprog SockFprog ucred Ucred \ + icmp6_filter ICMPv6Filter while test $# != 0; do nc=$1 ngo=$2 @@ -1143,5 +1159,8 @@ fi if ! grep 'const SizeofIPMreqn ' ${OUT} >/dev/null 2>&1; then echo 'const SizeofIPMreqn = 12' >> ${OUT} fi +if ! grep 'const SizeofICMPv6Filter ' ${OUT} >/dev/null 2>&1; then + echo 'const SizeofICMPv6Filter = 32' >> ${OUT} +fi exit $? |