Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 13 Apr 2022 14:24:32 +0200
From: Natanael Copa <>
To: "Gary E. Miller" <>
Subject: Re: *strerror_r() bug in musl

On Tue, 12 Apr 2022 13:43:55 -0700
"Gary E. Miller" <> wrote:

> Yo All!


> I'm new to the list.  I;ve been trying to report a musl bug on #musl since
> last Friday, but no one seems to live there.
> musl (all versions) has a bug in strerror_r().
> The musl reference manual says of _GNUSOURCE:
>     Adds everything above, plus interfaces modeled after GNU libc
>     extensions and interfaces for making use of Linux-specific features.
> I take that to mean that when _GNU_SOURCE is used to compile code with musl
> that the results will behave as GNU libc (glinc).

Well, as other has mentioned. GNU libc has a non-compliant version of

> When _GNU_SOURCE is defined with glibc, then strerror_r() returns a char *.

I have met this in multiple places the last decade. The usual way to
fix it is to also check for GNU libc in addition to _GNU_SOURCE.

#if defined (__GLIBC__) && defined (_GNU_SOURCE)
	/* non-standard GLIBC exception */
	/* standard behavior for everything else */


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.