0041-Use-generic-errstr.go-implementation-on-musl.patch (1655B)
1 From 70d70a1106b31ab840dbf5361312af221a2d5f04 Mon Sep 17 00:00:00 2001 2 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net> 3 Date: Mon, 19 Apr 2021 07:21:41 +0200 4 Subject: [PATCH] Use generic errstr.go implementation on musl 5 6 glibc provides two version of strerror_r() depending on a feature test 7 macro. The first is the XSI-compliant version which returns an int, the 8 second is GNU-specific and returns a char pointer. 9 10 Similarity, gcc's libgo provides two implementations of Errstr() both of 11 which use strerror_r(). On Linux, it is assumed that the GNU-specific 12 strerror_r version is used. However, musl only provides the 13 XSI-compliant version of strerror_r. This patch enables the generic 14 Errstr() implementation which also uses the XSI-compliant version of 15 strerror_r. 16 --- 17 libgo/go/syscall/errstr.go | 1 - 18 libgo/go/syscall/errstr_glibc.go | 2 +- 19 2 files changed, 1 insertion(+), 2 deletions(-) 20 21 diff --git a/libgo/go/syscall/errstr.go b/libgo/go/syscall/errstr.go 22 index 6c2441d364d..8f7c5538163 100644 23 --- a/libgo/go/syscall/errstr.go 24 +++ b/libgo/go/syscall/errstr.go 25 @@ -5,7 +5,6 @@ 26 // license that can be found in the LICENSE file. 27 28 // +build !hurd 29 -// +build !linux 30 31 package syscall 32 33 diff --git a/libgo/go/syscall/errstr_glibc.go b/libgo/go/syscall/errstr_glibc.go 34 index 5b19e6f202d..8dc60172186 100644 35 --- a/libgo/go/syscall/errstr_glibc.go 36 +++ b/libgo/go/syscall/errstr_glibc.go 37 @@ -7,7 +7,7 @@ 38 // We use this rather than errstr.go because on GNU/Linux sterror_r 39 // returns a pointer to the error message, and may not use buf at all. 40 41 -// +build hurd linux 42 +// +build hurd !linux 43 44 package syscall 45 46 -- 47 2.31.1 48