Skip to content

Commit bd9284d

Browse files
authored
Merge pull request ARMmbed#2 from geky/fs-remove-unistd-2
Filesystem: Removed dependency on unistd.h
2 parents 80a74c6 + 488227d commit bd9284d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

platform/retarget.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151

5252
#else
5353
# include <sys/stat.h>
54-
# include <sys/unistd.h>
5554
# include <sys/syslimits.h>
5655
# define PREFIX(x) x
5756
#endif
@@ -385,7 +384,7 @@ extern "C" long PREFIX(_flen)(FILEHANDLE fh) {
385384

386385
#if !defined(__ARMCC_VERSION) && !defined(__ICCARM__)
387386
extern "C" int _fstat(int fd, struct stat *st) {
388-
if ((STDOUT_FILENO == fd) || (STDERR_FILENO == fd) || (STDIN_FILENO == fd)) {
387+
if (fd < 3) {
389388
st->st_mode = S_IFCHR;
390389
return 0;
391390
}

0 commit comments

Comments
 (0)