summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/dirent/closedir.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libc-top-half/musl/src/dirent/closedir.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/dirent/closedir.c b/libc-top-half/musl/src/dirent/closedir.c
new file mode 100644
index 0000000..e794ae9
--- /dev/null
+++ b/libc-top-half/musl/src/dirent/closedir.c
@@ -0,0 +1,11 @@
+#include <dirent.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include "__dirent.h"
+
+int closedir(DIR *dir)
+{
+ int ret = close(dir->fd);
+ free(dir);
+ return ret;
+}