1 /* See LICENSE of license details. */ 2 3 #include <errno.h> 4 #include <unistd.h> 5 #include <sys/stat.h> 6 #include "stub.h" 7 _fstat(int fd,struct stat * st)8int _fstat(int fd, struct stat* st) 9 { 10 if (isatty(fd)) { 11 st->st_mode = S_IFCHR; 12 return 0; 13 } 14 15 return _stub(EBADF); 16 } 17