Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170220170354.GS1520@brightrain.aerifal.cx>
Date: Mon, 20 Feb 2017 12:03:54 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: No definition of PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
 in musl

On Mon, Feb 20, 2017 at 05:24:19PM +0100, Markus Wichmann wrote:
> On Mon, Feb 20, 2017 at 03:22:41PM +0000, Raphael Cohn wrote:
> > Hi,
> > 
> > Whilst trying to compile ReOpenLDAP (https://github.com/ReOpen/ReOpenLDAP),
> > a fork of OpenLDAP, I'm running into a wall. Some of the code wants a
> > definition of PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP. musl doesn't define
> > this; I suspect this is a non-portable glibc extension in pthread.h. Does
> > any one have any ideas how I might workaround this? Is there an alternative
> > construction that the code could use?
> > 
> 
> Well, not directly.
> 
> [...]
> 
> Alternatively, you could look up the effects the above snippet has on
> the mutex under musl, at least at the moment, and declare the
> nonportable initializer yourself. At the moment, I think it would be
> 
> #define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP {{PTHREAD_MUTEX_RECURSIVE}}

This is a very bad idea, and _will_ break when (not if, when) we
change the layout. It's made opaque for a good reason.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.