From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3949 Path: news.gmane.org!not-for-mail From: Yu Kobayashi Newsgroups: gmane.linux.lib.musl.general Subject: Re: SUN_LEN Date: Thu, 22 Aug 2013 02:58:28 +0900 Message-ID: References: <5214B4CF.4090202@barfooze.de> <20130821144552.GD30088@port70.net> <20130821162339.GY20515@brightrain.aerifal.cx> <20130821163428.GE30088@port70.net> <20130821163645.GZ20515@brightrain.aerifal.cx> <20130821164220.GA20515@brightrain.aerifal.cx> <20130821170036.GF30088@port70.net> <20130821172536.GB20515@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1377107918 6617 80.91.229.3 (21 Aug 2013 17:58:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Aug 2013 17:58:38 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3953-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 21 19:58:41 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 1VCCg5-0004SG-FX for gllmg-musl@plane.gmane.org; Wed, 21 Aug 2013 19:58:41 +0200 Original-Received: (qmail 11378 invoked by uid 550); 21 Aug 2013 17:58:41 -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 11370 invoked from network); 21 Aug 2013 17:58:40 -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; bh=doOfTFYwWOtZNrZNTmG47UNcKYn0pPRs/h0SzukVM3s=; b=plOEsv/YKW/jIbyTUIsJnLWx1m/I9z23NNDdhH97oeK25+h1qwxmm1SwWT/apdfp9P 0tmjSf7Z0bsQ6o6fYjGxnx06cKp3HOm+NFl5J+j75PTHyKE5SkR79o3BfcjNwoPUHaKC eyrSBz5PbvYHZ21TPatHt3nUYDk/j25ep3u8rKi8UIHSfHMqjN9q0rW2iB14LRzBSuT/ icD/jjtSEaZrAxHuda0BWKIFsW8ATUD0Yvq+JzqZ2PUg/k0wBq9pTK/pLtpZJS3XXOFh DnQy0XVmq87LEkwMyyJ6ta2cbidXSTTrkSBYh/1cIe/1lj26sgeuCa2Jqv1rAEIyXtgX u05A== X-Received: by 10.42.152.1 with SMTP id g1mr900967icw.3.1377107908880; Wed, 21 Aug 2013 10:58:28 -0700 (PDT) Original-Reply-To: yukoba@accelart.jp In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:3949 Archived-At: >> Why is it a bad thing to include ? >> Worry about cyclic dependency? > Well it puts a lot more stuff into the namespace and has a much larger > parsing cost How about this. #if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) #define SUN_LEN(s) __sun_len(s) #endif And add __sun_len.c like this. #include #include size_t __sun_len(struct sockaddr_un *s) { return sizeof(sa_family_t) + strlen(s->sun_path); } I think this solve the problem. -- Yu Kobayashi