feat: provide some libc routines only for testing
[lunaix-os.git] / lunaix-os / usr / includes / dirent.h
diff --git a/lunaix-os/usr/includes/dirent.h b/lunaix-os/usr/includes/dirent.h
new file mode 100644 (file)
index 0000000..30ed892
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef __LUNAIX_SYS_DIRENT_H
+#define __LUNAIX_SYS_DIRENT_H
+
+#include <sys/dirent_defs.h>
+
+typedef struct
+{
+    int dirfd;
+    int prev_res;
+} DIR;
+
+struct dirent
+{
+    unsigned char d_type;
+    char d_name[256];
+};
+
+DIR*
+opendir(const char* dir);
+
+struct dirent*
+readdir(DIR* dir);
+
+#endif /* __LUNAIX_DIRENT_H */