diff options
Diffstat (limited to 'io/fstat64.c')
-rw-r--r-- | io/fstat64.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/io/fstat64.c b/io/fstat64.c index addf379..6181706 100644 --- a/io/fstat64.c +++ b/io/fstat64.c @@ -16,10 +16,16 @@ <https://www.gnu.org/licenses/>. */ #include <sys/stat.h> +#include <errno.h> int __fstat64 (int fd, struct stat64 *buf) { + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } return __fstatat64 (fd, "", buf, AT_EMPTY_PATH); } hidden_def (__fstat64) |