am a5bab412: Merge "Fix struct statfs for LP64."
* commit 'a5bab412e0bcb4f9e449d594330819c321cf18ad': Fix struct statfs for LP64.
This commit is contained in:
commit
013afce94f
@ -37,37 +37,53 @@ __BEGIN_DECLS
|
|||||||
/* The kernel's __kernel_fsid_t has a 'val' member but glibc uses '__val'. */
|
/* The kernel's __kernel_fsid_t has a 'val' member but glibc uses '__val'. */
|
||||||
typedef struct { int __val[2]; } __fsid_t;
|
typedef struct { int __val[2]; } __fsid_t;
|
||||||
|
|
||||||
/* Our struct statfs corresponds to the kernel's statfs64 type. */
|
#if defined(__LP64__)
|
||||||
#ifdef __mips__
|
|
||||||
struct statfs {
|
struct statfs {
|
||||||
uint32_t f_type;
|
uint64_t f_type;
|
||||||
uint32_t f_bsize;
|
uint64_t f_bsize;
|
||||||
uint32_t f_frsize;
|
uint64_t f_blocks;
|
||||||
uint32_t __pad;
|
uint64_t f_bfree;
|
||||||
uint64_t f_blocks;
|
uint64_t f_bavail;
|
||||||
uint64_t f_bfree;
|
uint64_t f_files;
|
||||||
uint64_t f_files;
|
uint64_t f_ffree;
|
||||||
uint64_t f_ffree;
|
__fsid_t f_fsid;
|
||||||
uint64_t f_bavail;
|
uint64_t f_namelen;
|
||||||
__fsid_t f_fsid;
|
uint64_t f_frsize;
|
||||||
uint32_t f_namelen;
|
uint64_t f_flags;
|
||||||
uint32_t f_flags;
|
uint64_t f_spare[4];
|
||||||
uint32_t f_spare[5];
|
};
|
||||||
|
#elif defined(__mips__)
|
||||||
|
/* 32-bit MIPS (corresponds to the kernel's statfs64 type). */
|
||||||
|
struct statfs {
|
||||||
|
uint32_t f_type;
|
||||||
|
uint32_t f_bsize;
|
||||||
|
uint32_t f_frsize;
|
||||||
|
uint32_t __pad;
|
||||||
|
uint64_t f_blocks;
|
||||||
|
uint64_t f_bfree;
|
||||||
|
uint64_t f_files;
|
||||||
|
uint64_t f_ffree;
|
||||||
|
uint64_t f_bavail;
|
||||||
|
__fsid_t f_fsid;
|
||||||
|
uint32_t f_namelen;
|
||||||
|
uint32_t f_flags;
|
||||||
|
uint32_t f_spare[5];
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
|
/* 32-bit ARM or x86 (corresponds to the kernel's statfs64 type). */
|
||||||
struct statfs {
|
struct statfs {
|
||||||
uint32_t f_type;
|
uint32_t f_type;
|
||||||
uint32_t f_bsize;
|
uint32_t f_bsize;
|
||||||
uint64_t f_blocks;
|
uint64_t f_blocks;
|
||||||
uint64_t f_bfree;
|
uint64_t f_bfree;
|
||||||
uint64_t f_bavail;
|
uint64_t f_bavail;
|
||||||
uint64_t f_files;
|
uint64_t f_files;
|
||||||
uint64_t f_ffree;
|
uint64_t f_ffree;
|
||||||
__fsid_t f_fsid;
|
__fsid_t f_fsid;
|
||||||
uint32_t f_namelen;
|
uint32_t f_namelen;
|
||||||
uint32_t f_frsize;
|
uint32_t f_frsize;
|
||||||
uint32_t f_flags;
|
uint32_t f_flags;
|
||||||
uint32_t f_spare[4];
|
uint32_t f_spare[4];
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user