Filesystem: Removed dependency on unistd.h

Previously used to determine stdin/stdout/stderr filenos, however
these are set by us
pull/3762/head
Christopher Haster 2017-01-19 10:29:15 -06:00 committed by Simon Hughes
parent 9299a88e8f
commit b1a685125b
1 changed files with 1 additions and 2 deletions

View File

@ -51,7 +51,6 @@
#else
# include <sys/stat.h>
# include <sys/unistd.h>
# include <sys/syslimits.h>
# define PREFIX(x) x
#endif
@ -385,7 +384,7 @@ extern "C" long PREFIX(_flen)(FILEHANDLE fh) {
#if !defined(__ARMCC_VERSION) && !defined(__ICCARM__)
extern "C" int _fstat(int fd, struct stat *st) {
if ((STDOUT_FILENO == fd) || (STDERR_FILENO == fd) || (STDIN_FILENO == fd)) {
if (fd < 3) {
st->st_mode = S_IFCHR;
return 0;
}