From: Ian Lance Taylor Date: Mon, 31 Oct 2011 21:55:22 +0000 (+0000) Subject: syscall: Fix Errstr on systems without strerror_r. X-Git-Tag: releases/gcc-4.7.0~2677 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e547d7b317e52d0fbf4270aadcf47862d5faf73;p=thirdparty%2Fgcc.git syscall: Fix Errstr on systems without strerror_r. From-SVN: r180714 --- diff --git a/libgo/go/syscall/errstr_nor.go b/libgo/go/syscall/errstr_nor.go index b331d0eb9657..2fb61c29adce 100644 --- a/libgo/go/syscall/errstr_nor.go +++ b/libgo/go/syscall/errstr_nor.go @@ -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 {