From c6bc011c0c4966fff1a60eccbe21e6e66b3e679e Mon Sep 17 00:00:00 2001 From: ianwoolf Date: Sun, 17 Jul 2022 22:22:32 +0800 Subject: [PATCH] unix: add socket constants Fixes golang/go#53557 Change-Id: Ic3d57d9431d7c89f6650ff742888481bcabb23c6 Reviewed-on: https://go-review.googlesource.com/c/sys/+/417994 Reviewed-by: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov Run-TryBot: Ian Lance Taylor Auto-Submit: Ian Lance Taylor TryBot-Result: Gopher Robot --- unix/mkerrors.sh | 4 ++++ unix/zerrors_linux.go | 1 + 2 files changed, 5 insertions(+) diff --git a/unix/mkerrors.sh b/unix/mkerrors.sh index ca50e4e1..2ab44aa6 100755 --- a/unix/mkerrors.sh +++ b/unix/mkerrors.sh @@ -297,6 +297,10 @@ struct ltchars { #define SOL_NETLINK 270 #endif +#ifndef SOL_SMC +#define SOL_SMC 286 +#endif + #ifdef SOL_BLUETOOTH // SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h // but it is already in bluetooth_linux.go diff --git a/unix/zerrors_linux.go b/unix/zerrors_linux.go index b0d6c273..785d693e 100644 --- a/unix/zerrors_linux.go +++ b/unix/zerrors_linux.go @@ -2940,6 +2940,7 @@ const ( SOL_RAW = 0xff SOL_RDS = 0x114 SOL_RXRPC = 0x110 + SOL_SMC = 0x11e SOL_TCP = 0x6 SOL_TIPC = 0x10f SOL_TLS = 0x11a