mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-31 11:10:51 +08:00
syscall: Fix Errstr on systems without strerror_r.
From-SVN: r180714
This commit is contained in:
parent
82a5950228
commit
7e547d7b31
@ -11,7 +11,7 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//sysnb strerror(errnum int) *byte
|
||||
//sysnb strerror(errnum int) (buf *byte)
|
||||
//strerror(errnum int) *byte
|
||||
|
||||
var errstr_lock sync.Mutex
|
||||
@ -19,7 +19,7 @@ var errstr_lock sync.Mutex
|
||||
func Errstr(errno int) string {
|
||||
errstr_lock.Lock()
|
||||
|
||||
bp := libc_strerror(errno)
|
||||
bp := strerror(errno)
|
||||
b := (*[1000]byte)(unsafe.Pointer(bp))
|
||||
i := 0
|
||||
for b[i] != 0 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user