#include "reent.h" #include "errno.h" #include int close(int fd) { if (!fio_is_open(fd)) { set_errno(EBADF); return -1; } return fio_close(fd); }