On Tue, Nov 29, 2022 at 4:10 PM Ian Lance Taylor wrote: > > On Tue, Nov 29, 2022 at 9:54 AM wrote: > > > > From: Sören Tempel > > > > On glibc, there are two versions of strerror_r: An XSI-compliant and a > > GNU-specific version. The latter is only available on glibc. In order > > to avoid duplicating the post-processing code of error messages, this > > commit provides a separate strerror_go symbol which always refers to the > > XSI-compliant version of strerror_r (even on glibc) by selectively > > undefining the corresponding feature test macro. > > > > Previously, gofrontend assumed that the GNU-specific version of > > strerror_r was always available on Linux (which isn't the case when > > using a musl as a libc, for example). This commit thereby improves > > compatibility with Linux systems that are not using glibc. > > > > Tested on x86_64 Alpine Linux Edge and Arch Linux (glibc 2.36). > > Thanks. I committed a version of this, as attached. I've committed this follow-on patch for Hurd. Ian