From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1921) id 150473854159; Mon, 11 Jul 2022 11:51:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 150473854159 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Make the path length of UNIX domain sockets X-Act-Checkin: newlib-cygwin X-Git-Author: Jonathan T. Looney X-Git-Refname: refs/heads/master X-Git-Oldrev: 86484e84d7be074b540c8e11650bed025692d71f X-Git-Newrev: 09e5cb57a0c837c0c442668a8dacea19a1d9522a Message-Id: <20220711115139.150473854159@sourceware.org> Date: Mon, 11 Jul 2022 11:51:39 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2022 11:51:39 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D09e5cb57a0c= 837c0c442668a8dacea19a1d9522a commit 09e5cb57a0c837c0c442668a8dacea19a1d9522a Author: Jonathan T. Looney Date: Tue Apr 14 15:27:24 2020 +0000 Make the path length of UNIX domain sockets =20 specified by a #define. Also, add a comment describing the historical c= ontext for this length. =20 Reviewed by: bz, jhb, kbowling (previous version) MFC after: 2 weeks Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D24272 Diff: --- newlib/libc/sys/rtems/include/sys/un.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/newlib/libc/sys/rtems/include/sys/un.h b/newlib/libc/sys/rtems= /include/sys/un.h index f83652e07..3c408628c 100644 --- a/newlib/libc/sys/rtems/include/sys/un.h +++ b/newlib/libc/sys/rtems/include/sys/un.h @@ -43,13 +43,21 @@ typedef __sa_family_t sa_family_t; #define _SA_FAMILY_T_DECLARED #endif =20 +/* + * Historically, (struct sockaddr) needed to fit inside an mbuf. + * For this reason, UNIX domain sockets were therefore limited to + * 104 bytes. While this limit is no longer necessary, it is kept for + * binary compatibility reasons. + */ +#define SUNPATHLEN 104 + /* * Definitions for UNIX IPC domain. */ struct sockaddr_un { unsigned char sun_len; /* sockaddr len including null */ sa_family_t sun_family; /* AF_UNIX */ - char sun_path[104]; /* path name (gag) */ + char sun_path[SUNPATHLEN]; /* path name (gag) */ }; =20 #if __BSD_VISIBLE