mksysinfo: Fix for recent change to glibc <sys/resource.h>.

From-SVN: r188228
This commit is contained in:
Ian Lance Taylor 2012-06-05 05:32:54 +00:00
parent c11965508b
commit 70b9f51628
1 changed files with 2 additions and 0 deletions

View File

@ -524,6 +524,8 @@ rusage=`grep '^type _rusage struct' gen-sysinfo.go`
if test "$rusage" != ""; then
rusage=`echo $rusage | sed -e 's/type _rusage struct //' -e 's/[{}]//g'`
rusage=`echo $rusage | sed -e 's/^ *//'`
# Remove anonymous unions from GNU/Linux <bits/resource.h>.
rusage=`echo $rusage | sed -e 's/Godump_[0-9]* struct {\([^}]*\)};/\1/g'`
nrusage=
while test -n "$rusage"; do
field=`echo $rusage | sed -e 's/^\([^;]*\);.*$/\1/'`