summaryrefslogtreecommitdiff
path: root/libc/src/close.c
blob: fd4256f586d595b386199ff731eb57db7f0a39b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "reent.h"
#include "errno.h"
#include <fio.h>

int close(int fd) {
    if (!fio_is_open(fd)) {
        _impure_ptr->_errno = EBADF;
        return -1;
    }
    
    return fio_close(fd);
}