summaryrefslogtreecommitdiff
path: root/ldso/ldso/mips/dl-syscalls.h
diff options
context:
space:
mode:
Diffstat (limited to 'ldso/ldso/mips/dl-syscalls.h')
-rw-r--r--ldso/ldso/mips/dl-syscalls.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/ldso/ldso/mips/dl-syscalls.h b/ldso/ldso/mips/dl-syscalls.h
index e4a1ff9c4..f0f4baed8 100644
--- a/ldso/ldso/mips/dl-syscalls.h
+++ b/ldso/ldso/mips/dl-syscalls.h
@@ -1,7 +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. */
-
-#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"