From b8361e2e12f612cf302bc03c2c9e7a648c37a84e Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 12 May 2004 22:54:59 +0000 Subject: Add a local '_dl_errno' to be used by syscalls in ldso, allowing useful syscall failure diagnostics. --- ldso/ldso/frv/dl-syscalls.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ldso/ldso/frv') diff --git a/ldso/ldso/frv/dl-syscalls.h b/ldso/ldso/frv/dl-syscalls.h index bef4f1720..b51a78a79 100644 --- a/ldso/ldso/frv/dl-syscalls.h +++ b/ldso/ldso/frv/dl-syscalls.h @@ -17,12 +17,11 @@ You should have received a copy of the GNU Lesser General Public License along with uClibc; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* Define the __set_errno macro as nothing so that INLINE_SYSCALL - * won't set errno, which is important since we make system calls - * before the errno symbol is dynamicly linked. */ -#define __set_errno(X) {(void)(X);} +/* We can't use the real errno in ldso, since it has not yet + * been dynamicly linked in yet. */ +extern int _dl_errno; +#define __set_errno(X) {(_dl_errno) = (X);} #include "sys/syscall.h" #include -- cgit v1.2.3