summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdio/rget.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/rget.c')
-rw-r--r--newlib/libc/stdio/rget.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/newlib/libc/stdio/rget.c b/newlib/libc/stdio/rget.c
index ee4e49ec9..1c0bc474c 100644
--- a/newlib/libc/stdio/rget.c
+++ b/newlib/libc/stdio/rget.c
@@ -22,6 +22,7 @@ static char sccsid[] = "%W% (Berkeley) %G%";
#include <_ansi.h>
#include <stdio.h>
+#include <errno.h>
#include "local.h"
/*
@@ -31,10 +32,11 @@ static char sccsid[] = "%W% (Berkeley) %G%";
*/
int
-_DEFUN(__srget, (fp),
+_DEFUN(__srget_r, (ptr, fp),
+ struct _reent *ptr _AND
register FILE *fp)
{
- if (__srefill (fp) == 0)
+ if (__srefill_r (ptr, fp) == 0)
{
fp->_r--;
return *fp->_p++;