summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/arm
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-07-16 03:27:44 +0000
committerMike Frysinger <vapier@gentoo.org>2005-07-16 03:27:44 +0000
commit1a6075d08d4f75b702d597e0e6d11fe93deeedb5 (patch)
tree04b94901afefd420ce04bc50d126acd420774088 /libc/sysdeps/linux/arm
parent93b87ac72f84ac2f7924a7e4220e1d0eb86371de (diff)
with the help of John Bowler, track down the ugly ABI change between 2.4 / 2.6 on big endian arm kernels and work around it best we can at runtime
Diffstat (limited to 'libc/sysdeps/linux/arm')
-rw-r--r--libc/sysdeps/linux/arm/bits/kernel_stat.h32
1 files changed, 28 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/arm/bits/kernel_stat.h b/libc/sysdeps/linux/arm/bits/kernel_stat.h
index d482224ec..3cd9bd8dc 100644
--- a/libc/sysdeps/linux/arm/bits/kernel_stat.h
+++ b/libc/sysdeps/linux/arm/bits/kernel_stat.h
@@ -36,21 +36,45 @@ struct kernel_stat {
unsigned long __unused5;
};
+/* see the notes in common/xstatconv.c about why we have these
+ * funky funk unions here ... i blame the schools */
struct kernel_stat64 {
- unsigned short st_dev;
- unsigned char __pad0[10];
+#if defined(__ARMEB__)
+ union {
+ unsigned short old_abi;
+ unsigned long long new_abi;
+ } st_dev;
+#else
+ unsigned long long st_dev;
+#endif
+ unsigned char __pad0[4];
+
#define _HAVE_STAT64___ST_INO
unsigned long __st_ino;
unsigned int st_mode;
unsigned int st_nlink;
unsigned long st_uid;
unsigned long st_gid;
- unsigned short st_rdev;
- unsigned char __pad3[10];
+
+#if defined(__ARMEB__)
+ union {
+ unsigned short old_abi;
+ unsigned long long new_abi;
+ } st_rdev;
+#else
+ unsigned long long st_rdev;
+#endif
+ unsigned char __pad3[4];
+
long long st_size;
unsigned long st_blksize;
+#if defined(__ARMEB__)
+ unsigned long __pad_st_blocks; /* future possible st_blocks high bits */
+ unsigned long st_blocks; /* Number 512-byte blocks allocated. */
+#else
unsigned long st_blocks; /* Number 512-byte blocks allocated. */
unsigned long __pad4; /* future possible st_blocks high bits */
+#endif
unsigned long st_atime;
unsigned long st_atime_nsec;
unsigned long st_mtime;