This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: struct statfs/statfs64 in linux-generic
- From: Chung-Lin Tang <cltang at codesourcery dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: "libc-ports at sourceware dot org" <libc-ports at sourceware dot org>, Chris Metcalf <cmetcalf at tilera dot com>
- Date: Tue, 5 Nov 2013 12:23:17 +0800
- Subject: Re: struct statfs/statfs64 in linux-generic
- Authentication-results: sourceware.org; auth=none
- References: <52774A2F dot 5010505 at codesourcery dot com> <CA+=Sn1m7102-LJg8ee-ZchCaSLF1iPQKegQW6J59XS8HbX0qOg at mail dot gmail dot com>
On 2013/11/4 04:19 PM, Andrew Pinski wrote:
> --- a/ports/sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h
> +++ b/ports/sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h
> @@ -53,7 +53,7 @@
> #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
> #define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
> #define __FSFILCNT64_T_TYPE __UQUAD_TYPE
> -#define __FSWORD_T_TYPE __SWORD_TYPE
> +#define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE
> #define __ID_T_TYPE __U32_TYPE
> #define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE
> #define __TIME_T_TYPE __SYSCALL_SLONG_TYPE
I'm guessing you re-defined __SYSCALL_SLONG_TYPE to a 64-bit signed type
as well? The default seems to be __SLONGWORD_TYPE, which is a 4-byte
long int.
Still, I'm not sure if using full 64-bit fields should be the intended
solution. A full 32-bit target should be able to have those fields as
32-bit (which means a kernel patch to differentiate the current uses of
'__statfs_word' into 32/64-bit words)
Chung-Lin