From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4244 Path: news.gmane.org!not-for-mail From: Raphael Cohn Newsgroups: gmane.linux.lib.musl.general Subject: Re: Trying to compile libselinux against musl Date: Wed, 20 Nov 2013 10:33:16 +0000 Message-ID: References: <20131119191550.GC1685@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c2a20c20266f04eb994ffe X-Trace: ger.gmane.org 1384943605 13442 80.91.229.3 (20 Nov 2013 10:33:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Nov 2013 10:33:25 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4248-gllmg-musl=m.gmane.org@lists.openwall.com Wed Nov 20 11:33:32 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 1Vj56A-0007Y9-W0 for gllmg-musl@plane.gmane.org; Wed, 20 Nov 2013 11:33:31 +0100 Original-Received: (qmail 18219 invoked by uid 550); 20 Nov 2013 10:33:29 -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 18211 invoked from network); 20 Nov 2013 10:33:29 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=ZnAl178pBr8yvPxpD+VsrbKdIf3PM3Iv5RvxB6t8n7s=; b=jxC4Y7QngelI4WjXXGf/5DY/EuQ5V1rSKhdO8lRj2Q7+D559Z6R9kC7TSIbH/anAWe YB+qqE8kHS9kvty0IiBZ9ROOZOCU3Q1KYZGemxj1nMfcv6eBBFPRVvpAMFn9710UYEwl cR0kgGrCrlv1ThQfj80HeV5RcGm5vjt/yAjNRcEqVXJnHgFbgwj1cuOF2yoovhiSkHXU X0YYWGF4uknxzIpMLdf8tkLaObmPdpHDAQyxzwXm3dXbL3kC0S/kFotbQbFXchV1z3up HDs50WpfU0drddFSQ7ujE5w8oB7VKFWe3Of0odlXjAPJFzTTuBI0CRq2K/rvlUYp/W+T u6jA== X-Gm-Message-State: ALoCoQnC1HR8bWsdsav2CfbLitK/aqH/DVbYZgvJxM8uoBRafdse+4ic5ZE2J4Gu1M9Ee3k1qSYw X-Received: by 10.182.24.69 with SMTP id s5mr29880874obf.35.1384943596866; Wed, 20 Nov 2013 02:33:16 -0800 (PST) X-Originating-IP: [2001:8b0:862:b944:d966:a7ca:ee1f:22a6] In-Reply-To: <20131119191550.GC1685@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:4244 Archived-At: --001a11c2a20c20266f04eb994ffe Content-Type: text/plain; charset=UTF-8 Thank you - using pthread_atfork seems to solve things. I've added in the macro by modifying the definition in glibc (Seems a bit pointless). Raphael Cohn Chief Architect, stormmq Co-Chair, OASIS MQTT Standard Secretary, OASIS AMQP Standard raphael.cohn@stormmq.com +44 7590 675 756 UK Office: Hamblethorpe Farm, Crag Lane, Bradley BD20 9DB, North Yorkshire, United Kingdom Telephone: +44 845 3712 567 Registered office: 16 Anchor Street, Chelmsford, Essex, CM2 0JY, United Kingdom StormMQ Limited is Registered in England and Wales under Company Number 07175657 StormMQ.com On 19 November 2013 19:15, Szabolcs Nagy wrote: > * Raphael Cohn [2013-11-19 16:20:27 +0000]: > > src/booleans.c wants to use the macro _D_ALLOC_NAMLEN - which seems to > be a > > glibc-ism in dirent.h. It may be possible to hack in their macro > definition > > should be fixed upstream > > > to overcome this; > > src/proccattr.c tries to use __register_atfork, which is in the LSB but I > > suspect is a glibc-ism. > > > > I'm stuck on the latter - I'm not deep into this stuff. Does anyone have > > any ideas how to patch / hack / bypass this to get things compiled? Are > > there any other workarounds (apart from not using libselinux or musl)? > > i think you can just use pthread_atfork instead > > #define __register_atfork(prepare,parent,child,dso) > pthread_atfork(prepare,parent,child) > > the dso arg is just there in case dlclose() is used > which is broken on glibc anyway and noop on musl > --001a11c2a20c20266f04eb994ffe Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thank you - using pthread_atfork seems to solve things. I&= #39;ve added in the macro by modifying the definition in glibc (Seems a bit= pointless).

Rap= hael Cohn
Chief Architect, stormmq
Co-Chair, OASIS MQTT Standard
Secretar= y, OASIS AMQP Standard
raphael.cohn@stormmq.com
+44 7590 675 756
<= div>
UK Office:
Hamblethorpe Farm, Crag Lane, Bradley BD20 9DB, North Yo= rkshire, United Kingdom
Telephone: +44 845 3712 567

Registered of= fice:
16 A= nchor Street, Chelmsford, Essex, CM2 0JY, United Kingdom
StormMQ Limited is Registered in England and Wales under Company Number 071= 75657
StormMQ.com


On 19 November 2013 19:15, Szabolcs Nagy= <= nsz@port70.net> wrote:
* Raphael Cohn <raphael.cohn= @stormmq.com> [2013-11-19 16:20:27 +0000]:
> src/booleans.c wants to use the macro _D_ALLOC_NAMLE= N - which seems to be a
> glibc-ism in dirent.h. It may be possible to hack in their macro defin= ition

should be fixed upstream

> to overcome this;
> src/proccattr.c tries to use __register_atfork, which is in the LSB bu= t I
> suspect is a glibc-ism.
>
> I'm stuck on the latter - I'm not deep into this stuff. Does a= nyone have
> any ideas how to patch / hack / bypass this to get things compiled? Ar= e
> there any other workarounds (apart from not using libselinux or musl)?=

i think you can just use pthread_atfork instead

#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,= parent,child)

the dso arg is just there in case dlclose() is used
which is broken on glibc anyway and noop on musl

--001a11c2a20c20266f04eb994ffe--