summaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2015-12-18 01:15:37 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2015-12-18 01:15:37 +0000
commitca18e0e78e8eb65b58849244b3f86d86bb744850 (patch)
treea2fa1924fb7bd9657cfc779a073932b06a4af567 /libgo
parentcfb00f7fa95bc1d713c849cb6a428035f8f9b7e0 (diff)
downloadlinaro-gcc-ca18e0e78e8eb65b58849244b3f86d86bb744850.tar.gz
linaro-gcc-ca18e0e78e8eb65b58849244b3f86d86bb744850.tar.bz2
linaro-gcc-ca18e0e78e8eb65b58849244b3f86d86bb744850.zip
syscall: Add definition for NLA_HDRLEN
This change updates mksysinfo.sh so it correctly includes the define NLA_HDRLEN in the syscall package. Fixes golang/go/#13629 Reviewed-on: https://go-review.googlesource.com/17893 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231796 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rwxr-xr-xlibgo/mksysinfo.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
index 662619f2076..9062c2c9236 100755
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -267,6 +267,9 @@ enum {
#ifdef TUNGETFILTER
TUNGETFILTER_val = TUNGETFILTER,
#endif
+#ifdef NLA_HDRLEN
+ NLA_HDRLEN_val = NLA_HDRLEN,
+#endif
};
EOF
@@ -1075,8 +1078,6 @@ if ! grep '^const TUNGETFILTER' ${OUT} >/dev/null 2>&1; then
fi
fi
-
-
# The ioctl flags for terminal control
grep '^const _TC[GS]ET' gen-sysinfo.go | grep -v _val | \
sed -e 's/^\(const \)_\(TC[GS]ET[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
@@ -1422,9 +1423,15 @@ grep '^type _rtnexthop ' gen-sysinfo.go | \
# The GNU/Linux netlink flags.
grep '^const _NETLINK_' gen-sysinfo.go | \
sed -e 's/^\(const \)_\(NETLINK_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
-grep '^const _NLA_' gen-sysinfo.go | \
+grep '^const _NLA_' gen-sysinfo.go | grep -v '_val =' | \
sed -e 's/^\(const \)_\(NLA_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
+if ! grep '^const NLA_HDRLEN' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _NLA_HDRLEN_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const NLA_HDRLEN = _NLA_HDRLEN_val' >> ${OUT}
+ fi
+fi
+
# The GNU/Linux packet socket flags.
grep '^const _PACKET_' gen-sysinfo.go | \
sed -e 's/^\(const \)_\(PACKET_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}