OSDN Git Service

mksysinfo: Fix for recent change to glibc <sys/resource.h>.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 5 Jun 2012 05:33:10 +0000 (05:33 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 5 Jun 2012 05:33:10 +0000 (05:33 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@188229 138bc75d-0d04-0410-961f-82ee72b054a4

libgo/mksysinfo.sh

index 655337f..6fe0403 100755 (executable)
@@ -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/'`