static int _hostfs_close_file(oe_fd_t* desc)
{
    int ret = -1;
    int retval = -1;
    file_t* file = _cast_file(desc);

    if (!file)
        OE_RAISE_ERRNO(OE_EINVAL);

    if (oe_syscall_close_ocall(&retval, file->host_fd) != OE_OK)
        OE_RAISE_ERRNO(OE_EINVAL);

    if (retval == -1)
        OE_RAISE_ERRNO(oe_errno);

    oe_free(file);

    ret = retval;

done:
    return ret;
}
static int _hostfs_close_file(oe_fd_t* desc)
{
    int ret = -1;
    int retval = -1;
    file_t* file = _cast_file(desc);

    if (!file)
        OE_RAISE_ERRNO(OE_EINVAL);

    if (oe_syscall_close_ocall(&retval, file->host_fd) != OE_OK)
        OE_RAISE_ERRNO(OE_EINVAL);

    if (retval == -1)
        OE_RAISE_ERRNO(oe_errno);

    oe_free(file);

    ret = retval;

done:
    return ret;
}