From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4242 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Trying to compile libselinux against musl Date: Tue, 19 Nov 2013 20:15:51 +0100 Message-ID: <20131119191550.GC1685@port70.net> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1384888558 14831 80.91.229.3 (19 Nov 2013 19:15:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Nov 2013 19:15:58 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4246-gllmg-musl=m.gmane.org@lists.openwall.com Tue Nov 19 20:16:04 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 1ViqmJ-0005jy-FL for gllmg-musl@plane.gmane.org; Tue, 19 Nov 2013 20:16:03 +0100 Original-Received: (qmail 28645 invoked by uid 550); 19 Nov 2013 19:16:02 -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 28637 invoked from network); 19 Nov 2013 19:16:02 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4242 Archived-At: * 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