diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-11-21 02:16:15 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-11-21 02:16:15 +0000 |
commit | d3d684c642943cb5a481fcc38e0ee46ee8b1223c (patch) | |
tree | bf9fcf131a8d50ca8eab060deb3743e24be11e7e /libgo | |
parent | dc1a3df45b3a56c9b0df5c944834be6f29f1de6b (diff) | |
download | gcc-d3d684c642943cb5a481fcc38e0ee46ee8b1223c.zip gcc-d3d684c642943cb5a481fcc38e0ee46ee8b1223c.tar.gz gcc-d3d684c642943cb5a481fcc38e0ee46ee8b1223c.tar.bz2 |
re PR go/88060 (../../../gcc-8.2.0/libgo/go/syscall/libcall_linux_utimesnano.go:17:18: error: reference to undefined name ‘_AT_FDCWD’)
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
From-SVN: r266333
Diffstat (limited to 'libgo')
-rwxr-xr-x | libgo/mksysinfo.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index 2fa7aff..d4286dc 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" |