summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/statfix.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-10-29 05:47:04 +0000
committerEric Andersen <andersen@codepoet.org>2000-10-29 05:47:04 +0000
commit87108d9ffaa3e4d4bc761453de093011e0d3398d (patch)
tree646702040ce8122cfcb857693671809ba35cacbc /libc/sysdeps/linux/common/statfix.h
parent4e1ec6cac528de017d8e8696e0442904847bdc54 (diff)
Fix up stat so we translate from kernel stat to libc stat. Try to fix
up a few little things with dir entry reading. busybox now compiles, and seems to basically work... :-) -Erik
Diffstat (limited to 'libc/sysdeps/linux/common/statfix.h')
-rw-r--r--libc/sysdeps/linux/common/statfix.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/statfix.h b/libc/sysdeps/linux/common/statfix.h
new file mode 100644
index 000000000..a4fac1d06
--- /dev/null
+++ b/libc/sysdeps/linux/common/statfix.h
@@ -0,0 +1,19 @@
+#ifndef STATFIX_H
+#define STATFIX_H
+
+/* Pull in whatever this particular arch's kernel thinks the kernel version of
+ * struct stat should look like. It turn out that each arch has a different
+ * opinion on the subject... */
+#define stat kernel_stat
+#include <asm/stat.h>
+#undef stat
+
+/* Now pull in libc's version of stat */
+#define stat libc_stat
+#include <sys/stat.h>
+#undef stat
+
+extern void statfix(struct libc_stat *libcstat, struct kernel_stat *kstat);
+
+#endif
+