aboutsummaryrefslogtreecommitdiff
path: root/libio/filedoalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/filedoalloc.c')
-rw-r--r--libio/filedoalloc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libio/filedoalloc.c b/libio/filedoalloc.c
index f36bfb3e32..836c56b63b 100644
--- a/libio/filedoalloc.c
+++ b/libio/filedoalloc.c
@@ -49,9 +49,12 @@ the executable file might be covered by the GNU General Public License. */
#include <sys/stat.h>
#ifdef __STDC__
#include <stdlib.h>
+#include <unistd.h>
#endif
+
#ifdef _LIBC
-# include <unistd.h>
+# undef isatty
+# define isatty(Fd) __isatty (Fd)
#endif
/*
@@ -100,7 +103,7 @@ DEFUN(_IO_file_doallocate, (fp),
}
ALLOC_BUF(p, size, EOF);
_IO_setb(fp, p, p+size, 1);
- if (couldbetty && __isatty (fp->_fileno))
+ if (couldbetty && isatty(fp->_fileno))
fp->_flags |= _IO_LINE_BUF;
return 1;
}