summaryrefslogtreecommitdiffstats
path: root/newlib/libc/sys
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/sys')
-rw-r--r--newlib/libc/sys/arm/syscalls.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/newlib/libc/sys/arm/syscalls.c b/newlib/libc/sys/arm/syscalls.c
index 6b08c3ec3..42e69b7b0 100644
--- a/newlib/libc/sys/arm/syscalls.c
+++ b/newlib/libc/sys/arm/syscalls.c
@@ -12,6 +12,7 @@
#include <sys/times.h>
#include <errno.h>
#include <reent.h>
+#include <unistd.h>
#include "swi.h"
/* Forward prototypes. */
@@ -125,11 +126,11 @@ remap_handle (int fh)
CHECK_INIT(stderr);
std_files_checked = 1;
}
- if (fh == __sfileno (stdin))
+ if (fh == STDIN_FILENO)
return monitor_stdin;
- if (fh == __sfileno (stdout))
+ if (fh == STDOUT_FILENO)
return monitor_stdout;
- if (fh == __sfileno (stderr))
+ if (fh == STDERR_FILENO)
return monitor_stderr;
return fh - FILE_HANDLE_OFFSET;