From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12933 Path: news.gmane.org!.POSTED!not-for-mail From: Matthias Schiffer Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH] sys/socket.h: fix SO_PEERSEC value on MIPS Date: Sun, 24 Jun 2018 17:18:39 +0200 Message-ID: <4e0877a604bad684be020f68e96a05156131fd44.1529853403.git.mschiffer@universe-factory.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1529853449 20499 195.159.176.226 (24 Jun 2018 15:17:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 24 Jun 2018 15:17:29 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-12949-gllmg-musl=m.gmane.org@lists.openwall.com Sun Jun 24 17:17:24 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1fX6lW-0005FV-UF for gllmg-musl@m.gmane.org; Sun, 24 Jun 2018 17:17:23 +0200 Original-Received: (qmail 30450 invoked by uid 550); 24 Jun 2018 15:19:27 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 30411 invoked from network); 24 Jun 2018 15:19:26 -0000 X-Mailer: git-send-email 2.18.0 Xref: news.gmane.org gmane.linux.lib.musl.general:12933 Archived-At: Differing from all other archs supported by musl, MIPS defines SO_PEERSEC to 30 instead of 31. Reported-by: Andrey Jr. Mlenikov --- arch/mips/bits/socket.h | 2 ++ arch/mips64/bits/socket.h | 2 ++ arch/mipsn32/bits/socket.h | 2 ++ include/sys/socket.h | 3 +++ 4 files changed, 9 insertions(+) diff --git a/arch/mips/bits/socket.h b/arch/mips/bits/socket.h index 191ebdb5a418..39c42b822ac3 100644 --- a/arch/mips/bits/socket.h +++ b/arch/mips/bits/socket.h @@ -48,5 +48,7 @@ struct cmsghdr { #define SO_SNDBUFFORCE 31 #define SO_RCVBUFFORCE 33 +#define SO_PEERSEC 30 + #define SOCK_NONBLOCK 0200 #define SOCK_CLOEXEC 02000000 diff --git a/arch/mips64/bits/socket.h b/arch/mips64/bits/socket.h index cf801797beb0..39b764df4c62 100644 --- a/arch/mips64/bits/socket.h +++ b/arch/mips64/bits/socket.h @@ -64,5 +64,7 @@ struct cmsghdr { #define SO_SNDBUFFORCE 31 #define SO_RCVBUFFORCE 33 +#define SO_PEERSEC 30 + #define SOCK_NONBLOCK 0200 #define SOCK_CLOEXEC 02000000 diff --git a/arch/mipsn32/bits/socket.h b/arch/mipsn32/bits/socket.h index 191ebdb5a418..39c42b822ac3 100644 --- a/arch/mipsn32/bits/socket.h +++ b/arch/mipsn32/bits/socket.h @@ -48,5 +48,7 @@ struct cmsghdr { #define SO_SNDBUFFORCE 31 #define SO_RCVBUFFORCE 33 +#define SO_PEERSEC 30 + #define SOCK_NONBLOCK 0200 #define SOCK_CLOEXEC 02000000 diff --git a/include/sys/socket.h b/include/sys/socket.h index 507da5cc2a40..6b6cf2fc3988 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -203,7 +203,10 @@ struct linger { #define SO_TIMESTAMP 29 #define SCM_TIMESTAMP SO_TIMESTAMP +#ifndef SO_PEERSEC #define SO_PEERSEC 31 +#endif + #define SO_PASSSEC 34 #define SO_TIMESTAMPNS 35 #define SCM_TIMESTAMPNS SO_TIMESTAMPNS -- 2.18.0