aboutsummaryrefslogtreecommitdiffstats
path: root/com32/include/sys/dirent.h
diff options
context:
space:
mode:
Diffstat (limited to 'com32/include/sys/dirent.h')
-rw-r--r--com32/include/sys/dirent.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/com32/include/sys/dirent.h b/com32/include/sys/dirent.h
new file mode 100644
index 00000000..cc2916e1
--- /dev/null
+++ b/com32/include/sys/dirent.h
@@ -0,0 +1,30 @@
+/*
+ * sys/dirent.h
+ */
+
+#ifndef DIRENT_H
+#define DIRENT_H
+
+#include <stdint.h>
+
+#ifndef NAME_MAX
+#define NAME_MAX 255
+#endif
+
+struct dirent {
+ uint32_t d_ino;
+ uint32_t d_off;
+ uint16_t d_reclen;
+ uint16_t d_type;
+ char d_name[NAME_MAX + 1];
+};
+
+struct file;
+
+typedef struct {
+ struct file *dd_dir;
+} DIR;
+
+#define DIR_REC_LEN(name) (12 + strlen(name) + 1 + 3) & ~3
+
+#endif /* sys/dirent.h */