summaryrefslogtreecommitdiff
path: root/ldso/ldso/sh64
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-05-12 22:54:59 +0000
committerEric Andersen <andersen@codepoet.org>2004-05-12 22:54:59 +0000
commitb8361e2e12f612cf302bc03c2c9e7a648c37a84e (patch)
treefbb89653743acec76d1b441b97f4025a1aaef046 /ldso/ldso/sh64
parent21da42ed9484a71756f5848d0f15dabbee3c6f41 (diff)
Add a local '_dl_errno' to be used by syscalls in ldso, allowing
useful syscall failure diagnostics.
Diffstat (limited to 'ldso/ldso/sh64')
-rw-r--r--ldso/ldso/sh64/dl-syscalls.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/ldso/ldso/sh64/dl-syscalls.h b/ldso/ldso/sh64/dl-syscalls.h
index 34da5d630..f0f4baed8 100644
--- a/ldso/ldso/sh64/dl-syscalls.h
+++ b/ldso/ldso/sh64/dl-syscalls.h
@@ -1,9 +1,6 @@
-/* Define the __set_errno macro as nothing so that we don't bother
- * setting errno, which is important since we make system calls
- * before the errno symbol is dynamicly linked. */
-
-#include <errno.h>
-#undef __set_errno
-#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"