diff options
Diffstat (limited to 'libgloss/rs6000/sim-errno.c')
-rw-r--r-- | libgloss/rs6000/sim-errno.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libgloss/rs6000/sim-errno.c b/libgloss/rs6000/sim-errno.c index 9a771b4d0..29cb4a2be 100644 --- a/libgloss/rs6000/sim-errno.c +++ b/libgloss/rs6000/sim-errno.c @@ -14,13 +14,8 @@ * they apply. */ -int errno; - -int * -__errno () -{ - return &errno; -} +#include <errno.h> +#include <reent.h> /* syscall handler branches here in case of error. */ @@ -28,6 +23,6 @@ int _cerror (e) int e; { - errno = e; + _REENT->_errno = e; return -1; } |