libgo: add missing _arpcom struct to *sysinfo.go

This struct is filtered due to having a field of type _in6_addr,
but other types exported to *sysinfo.go are depending on it.

Issue golang/go#19200

Change-Id: I090d67906c0d7191c31e827c3c60adad7a4f242e
Reviewed-on: https://go-review.googlesource.com/38251
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/libgo/mkrsysinfo.sh b/libgo/mkrsysinfo.sh
index af18594..7660662 100755
--- a/libgo/mkrsysinfo.sh
+++ b/libgo/mkrsysinfo.sh
@@ -30,6 +30,12 @@
       -e 's/\([^a-zA-Z0-9_]\)_timespec\([^a-zA-Z0-9_]\)/\1timespec\2/g' \
     >> ${OUT}
 
+# On AIX, the _arpcom struct, is filtered by the above grep sequence, as it as
+# a field of type _in6_addr, but other types depend on _arpcom, so we need to
+# put it back.
+grep '^type _arpcom ' gen-sysinfo.go | \
+  sed -e 's/_in6_addr/[16]byte/' >> ${OUT}
+
 # The time structures need special handling: we need to name the
 # types, so that we can cast integers to the right types when
 # assigning to the structures.
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
index ec2224d..6bc78bd 100755
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -42,6 +42,12 @@
       -e 's/\([^a-zA-Z0-9_]\)_timestruc_t\([^a-zA-Z0-9_]\)/\1Timestruc\2/g' \
     >> ${OUT}
 
+# On AIX, the _arpcom struct, is filtered by the above grep sequence, as it as
+# a field of type _in6_addr, but other types depend on _arpcom, so we need to
+# put it back.
+grep '^type _arpcom ' gen-sysinfo.go | \
+  sed -e 's/_in6_addr/[16]byte/' >> ${OUT}
+
 # The errno constants.  These get type Errno.
   egrep '#define E[A-Z0-9_]+ ' errno.i | \
   sed -e 's/^#define \(E[A-Z0-9_]*\) .*$/const \1 = Errno(_\1)/' >> ${OUT}