From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3934 Path: news.gmane.org!not-for-mail From: John Spencer Newsgroups: gmane.linux.lib.musl.general Subject: Re: SUN_LEN Date: Wed, 21 Aug 2013 14:03:32 +0200 Message-ID: <5214AC94.9090408@barfooze.de> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1377087058 13545 80.91.229.3 (21 Aug 2013 12:10:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Aug 2013 12:10:58 +0000 (UTC) Cc: =?UTF-8?B?5bCP5p6X5oKg?= To: musl@lists.openwall.com Original-X-From: musl-return-3938-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 21 14:11:01 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1VC7FZ-00042l-St for gllmg-musl@plane.gmane.org; Wed, 21 Aug 2013 14:10:58 +0200 Original-Received: (qmail 5950 invoked by uid 550); 21 Aug 2013 12:10:56 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5942 invoked from network); 21 Aug 2013 12:10:56 -0000 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Mail/1.0 In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:3934 Archived-At: On 08/21/2013 11:57 AM, 小林悠 wrote: > Hello. > > Could you please add SUN_LEN() to sys/un.h? which program needs it ? > > diff --git a/include/sys/un.h b/include/sys/un.h > index 769dac6..5289227 100644 > --- a/include/sys/un.h > +++ b/include/sys/un.h > @@ -10,4 +10,9 @@ struct sockaddr_un > char sun_path[108]; > }; > > +#ifndef SUN_LEN > +#include this looks like a namespace violation to me > +#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) > + strlen((ptr)->sun_path)) are these 2 lines meant to be connected with a \ ? as-is, this won't work... in glibc, it is defined as # define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \ + strlen ((ptr)->sun_path)) > +#endif > + > #endif >