aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Peter Kjellerstedt <peter.kjellerstedt@axis.com>2007-02-02 12:50:17 +0000
committerGravatar Peter Kjellerstedt <peter.kjellerstedt@axis.com>2007-02-02 12:50:17 +0000
commitb6cbd7db1bb03e4364052b0de3143f42f62cc4c5 (patch)
treeef2dea560a8c03c1a39fe2de79118c2583656911
parent52a3269c2cfac828db10a2aa1aa3b9b3118fa9a4 (diff)
downloaduClibc-b6cbd7db1bb03e4364052b0de3143f42f62cc4c5.tar.gz
uClibc-b6cbd7db1bb03e4364052b0de3143f42f62cc4c5.tar.bz2
Backported from the main trunk:
* Make sure struct stat is identical to struct stat64 if __USE_FILE_OFFSET64 is defined. This was the case for all architectures except those that use packed structures by default (i.e., CRIS).
-rw-r--r--libc/sysdeps/linux/common/bits/stat.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/bits/stat.h b/libc/sysdeps/linux/common/bits/stat.h
index 3e8e77f65..9c168df91 100644
--- a/libc/sysdeps/linux/common/bits/stat.h
+++ b/libc/sysdeps/linux/common/bits/stat.h
@@ -38,10 +38,11 @@
struct stat
{
__dev_t st_dev; /* Device. */
- unsigned short int __pad1;
#ifndef __USE_FILE_OFFSET64
+ unsigned short int __pad1;
__ino_t st_ino; /* File serial number. */
#else
+ unsigned int __pad1;
__ino_t __st_ino; /* 32bit file serial number. */
#endif
__mode_t st_mode; /* File mode. */
@@ -49,10 +50,11 @@ struct stat
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
- unsigned short int __pad2;
#ifndef __USE_FILE_OFFSET64
+ unsigned short int __pad2;
__off_t st_size; /* Size of file, in bytes. */
#else
+ unsigned int __pad2;
__off64_t st_size; /* Size of file, in bytes. */
#endif
__blksize_t st_blksize; /* Optimal block size for I/O. */