Files

20 lines
257 B
C
Raw Permalink Normal View History

#include "dir.h"
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
int closedir(struct __opaque_dir *dirp)
{
close(dirp->d_fd);
if (dirp->d_buf) {
free(dirp->d_buf);
}
free(dirp);
return SUCCESS;
}