From: ian Date: Wed, 21 Nov 2018 02:16:15 +0000 (+0000) Subject: PR go/88060 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c58765ba3ab86163844f3ad50b299bade05acd5;p=thirdparty%2Fgcc.git PR go/88060 syscall: always define _AT_FDCWD and IPv6MTUInfo They aren't defined by old versions of glibc, but are required by the code in syscall_linux.go. Reviewed-on: https://go-review.googlesource.com/c/150697 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266333 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 6c5d5bc93d2f..110cb8416a85 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -559fae430b81595efe151222385192a07a9fc3c3 +37cb9763cbe8407b8c3a237b05a5272a226f14a0 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index 2fa7affedb52..d4286dc1b1d5 100755 --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -202,6 +202,11 @@ if ! grep '^const AF_LOCAL ' ${OUT} >/dev/null 2>&1; then fi fi +# The syscall package requires _AT_FDCWD, but doesn't export it. +if ! grep '^const _AT_FDCWD = ' ${OUT} >/dev/null 2>&1; then + echo "const _AT_FDCWD = -100" >> ${OUT} +fi + # sysconf constants. grep '^const __SC' gen-sysinfo.go | sed -e 's/^\(const \)__\(SC[^= ]*\)\(.*\)$/\1\2 = __\2/' >> ${OUT} @@ -669,6 +674,14 @@ grep '^type _ip6_mtuinfo ' gen-sysinfo.go | \ -e 's/ip6m_mtu/Mtu/' \ >> ${OUT} +# We need IPv6MTUInfo to compile the syscall package. +if ! grep 'type IPv6MTUInfo ' ${OUT} >/dev/null 2>&1; then + echo 'type IPv6MTUInfo struct { Addr RawSockaddrInet6; Mtu uint32; }' >> ${OUT} +fi +if ! grep 'const _sizeof_ip6_mtuinfo = ' ${OUT} >/dev/null 2>&1; then + echo 'const SizeofIPv6MTUInfo = 32' >> ${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"