This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/4328] struct stat is bogus when __USE_FILE_OFFSET64 is defined
- From: "jakub at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 6 Apr 2007 08:52:46 -0000
- Subject: [Bug libc/4328] struct stat is bogus when __USE_FILE_OFFSET64 is defined
- References: <20070406094051.4328.bazsi@balabit.hu>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jakub at redhat dot com 2007-04-06 09:52 -------
Then the bug is Ubuntu specific.
(gdb) p (char *)&st64.st_size - (char *)&st64
$1 = 44
(gdb) p (char *)&st.st_size - (char *)&st
$2 = 44
and
#define _GNU_SOURCE
#define _LARGEFILE_SOURCE
#define _FILE_OFFSET_BITS 64
#include <sys/stat.h>
#include <stddef.h>
#include <stdio.h>
int
main (void)
{
printf ("%zd\n", (size_t) offsetof (struct stat, st_size));
printf ("%zd\n", (size_t) offsetof (struct stat64, st_size));
return 0;
}
prints 44 twice for 32-bit binaries (both on x86_64 -m32 and on i?86 only),
48 for 64-bit binaries.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
http://sourceware.org/bugzilla/show_bug.cgi?id=4328
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.