On Wed, Mar 6, 2019 at 5:39 AM Uros Bizjak <ubiz...@gmail.com> wrote: > > On Tue, Mar 5, 2019 at 9:50 PM Ian Lance Taylor <i...@golang.org> wrote: > > > > On Tue, Mar 5, 2019 at 1:02 AM Uros Bizjak <ubiz...@gmail.com> wrote: > > > > > > > I've committed this patch to update to the final Go 1.12 release. > > > > Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed > > > > to mainline. > > > > > > This patch introduced following failure in CentOS 5.11: > > > > > > syscall_linux_test.go:381:11: error: reference to undefined field or > > > method 'Flags' > > > 381 | return st.Flags&syscall.MS_NOSUID != 0 > > > | ^ > > > FAIL: syscall > > > > Thanks. Should be fixed by this patch, tested on x86_64-pc-linux-gnu, > > committed to mainline. > > Attached patchlet is also needed to create correct sysinfo.go. > > Tested on CentOS 5.11.
Bother, I don't know what I was thinking. I think this patch is a bit better. Could you test whether it works for you? Thanks. Ian
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index e0ae30f6..418ba2cf 100755 --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -1115,14 +1115,13 @@ grep '^const _FALLOC_' gen-sysinfo.go | # Prefer largefile variant if available. # CentOS 5 does not have f_flags, so pull from f_spare. statfs=`grep '^type _statfs64 ' gen-sysinfo.go || true` +if test "$statfs" == ""; then + statfs=`grep '^type _statfs ' gen-sysinfo.go || true` +fi if ! echo "$statfs" | grep f_flags; then statfs=`echo "$statfs" | sed -e 's/f_spare \[4+1\]\([^ ;]*\)/f_flags \1; f_spare [3+1]\1/'` fi -if test "$statfs" != ""; then - grep '^type _statfs64 ' gen-sysinfo.go -else - grep '^type _statfs ' gen-sysinfo.go -fi | sed -e 's/type _statfs64/type Statfs_t/' \ +echo "$statfs" | sed -e 's/type _statfs64/type Statfs_t/' \ -e 's/type _statfs/type Statfs_t/' \ -e 's/f_type/Type/' \ -e 's/f_bsize/Bsize/' \