From 1e4c9ba3b0c4fcddbe90893331bdc829813066a1 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 19 Mar 2021 19:26:42 +0100 Subject: [PATCH] unix: add ICMP_FILTER constant on linux Change-Id: I9ce0932c28ae8634270d69b0bd23216e963cc105 Reviewed-on: https://go-review.googlesource.com/c/sys/+/303369 Trust: Tobias Klauser Run-TryBot: Tobias Klauser TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor --- unix/mkerrors.sh | 3 ++- unix/zerrors_linux.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/unix/mkerrors.sh b/unix/mkerrors.sh index 87f9d1e3..0bdc9b53 100755 --- a/unix/mkerrors.sh +++ b/unix/mkerrors.sh @@ -216,6 +216,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -500,7 +501,7 @@ ccflags="$@" $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL)_/ || $2 ~ /^TP_STATUS_/ || $2 ~ /^FALLOC_/ || - $2 == "ICMPV6_FILTER" || + $2 ~ /^ICMP(V6)?_FILTER$/ || $2 == "SOMAXCONN" || $2 == "NAME_MAX" || $2 == "IFNAMSIZ" || diff --git a/unix/zerrors_linux.go b/unix/zerrors_linux.go index 504dd6cd..3b1b9287 100644 --- a/unix/zerrors_linux.go +++ b/unix/zerrors_linux.go @@ -974,6 +974,7 @@ const ( HUGETLBFS_MAGIC = 0x958458f6 IBSHIFT = 0x10 ICMPV6_FILTER = 0x1 + ICMP_FILTER = 0x1 ICRNL = 0x100 IFA_F_DADFAILED = 0x8 IFA_F_DEPRECATED = 0x20