From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3935 Path: news.gmane.org!not-for-mail From: =?ISO-2022-JP?B?GyRCPi5OU00qGyhC?= Newsgroups: gmane.linux.lib.musl.general Subject: Re: SUN_LEN Date: Wed, 21 Aug 2013 21:23:33 +0900 Message-ID: References: <5214AC94.9090408@barfooze.de> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1377087824 23388 80.91.229.3 (21 Aug 2013 12:23:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Aug 2013 12:23:44 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3939-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 21 14:23:48 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 1VC7Ry-0002iG-Ko for gllmg-musl@plane.gmane.org; Wed, 21 Aug 2013 14:23:46 +0200 Original-Received: (qmail 12102 invoked by uid 550); 21 Aug 2013 12:23:46 -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 12094 invoked from network); 21 Aug 2013 12:23:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=DJ79gjc96EhblJMjcvAtGy4OT79d8y5NcDf9gG4LlKc=; b=MTyKGu8r9oSrNox4qZEkUJiOf2DvmauxzgR9Mpu2sFV2yA06L+oejrIJ6h2rGiVaTQ Ti6xXCky6fjbmZXyMcLs/9TpMxVEJI7/xeVXwueRuGJgcBWOYWIOk/ECp1mtz5W7CfYQ VLBVUhUsWrsiLoEOiHT8xS5If1NMQM72MgB2uavrXImPJf+Pf5GHsqP7kvbd1jqAyj6t UFtwXx6SCchq0JhB/3ejQOqyuNN6YVNCjzetxiHjBLojaIcpC5uf3r9ZeI4vBRqja1Rj iHUnt3eBH3fWdEQCe060pIFNhmQuMdNe6+ByjVabVVqWI5gh3yvDSgW2uwNryGdY/t7G KmgA== X-Received: by 10.50.126.74 with SMTP id mw10mr5916842igb.24.1377087813903; Wed, 21 Aug 2013 05:23:33 -0700 (PDT) Original-Reply-To: yukoba@accelart.jp In-Reply-To: <5214AC94.9090408@barfooze.de> Xref: news.gmane.org gmane.linux.lib.musl.general:3935 Archived-At: Hello. > which program needs it ? It is used in here. https://android.googlesource.com/platform/system/core/+/master/libcutils/properties.c > are these 2 lines meant to be connected with a \ ? Yes. Sorry, I'm using Gmail and the line was too long. Gmail splits a long line automatically. 2013/8/21 John Spencer : > 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 >> > -- Yu Kobayashi