diff options
author | Jurij Smakov <jurij@wooyd.org> | 2005-12-29 01:19:42 +0100 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2005-12-28 22:08:26 -0800 |
commit | 59b8efc60fc1311140df7d1162a981900967119c (patch) | |
tree | b250dfbf4dd369c61a94dce646160de1d6a6604b | |
parent | 83f4fd8120099756d6615255dac92dd30f13fb77 (diff) | |
download | klibc-59b8efc60fc1311140df7d1162a981900967119c.tar.gz |
sparc64 fix stat()klibc-1.1.14
I've investigated the sparc stat() klibc problem a bit and found that the
definition of 'struct stat' in klibc's include/arch/sparc64/archstat.h is
(most probably) incorrect. I've written a simple test case using stat()
function and then looked at preprocessed source, which includes the
'struct stat' definition (from glibc headers) and copied that to
include/arch/sparc64/archstat.h. That required changing the storage size
for some fields, rearranging them, and adding some padding fields where
neccessary. Attached patch implements these changes.
With this change I was able to successfully boot my ultra5 box.
Signed-off-by: maximilian attems <maks@sternwelten.at>
-rw-r--r-- | include/arch/sparc64/klibc/archstat.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/include/arch/sparc64/klibc/archstat.h b/include/arch/sparc64/klibc/archstat.h index c22905d30c86c..cc54ad1199d34 100644 --- a/include/arch/sparc64/klibc/archstat.h +++ b/include/arch/sparc64/klibc/archstat.h @@ -3,20 +3,26 @@ /* No nsec fields?! */ struct stat { - unsigned st_dev; + unsigned long st_dev; + unsigned short __pad1; ino_t st_ino; mode_t st_mode; - short st_nlink; + unsigned int st_nlink; uid_t st_uid; gid_t st_gid; - unsigned st_rdev; + unsigned long st_rdev; + unsigned short __pad2; off_t st_size; + off_t st_blksize; + off_t st_blocks; time_t st_atime; + unsigned long __unused1; time_t st_mtime; + unsigned long __unused2; time_t st_ctime; - off_t st_blksize; - off_t st_blocks; - unsigned long __unused4[2]; + unsigned long __unused3; + unsigned long __unused4; + unsigned long __unused5; }; #endif |