[PATCH] fix build on systems that do not implement statfs64
Dmitry V. Levin
ldv at altlinux.org
Mon Mar 29 15:32:33 UTC 2010
On Mon, Mar 29, 2010 at 01:11:19PM +0100, Adrien Kunysz wrote:
> On Mon, Mar 29, 2010 at 04:55:23AM +0400, Dmitry V. Levin wrote:
> > On Sun, Mar 28, 2010 at 06:01:47PM +0100, Adrien Kunysz wrote:
> > > Commit 9906e6da8be98d27bffa2baeeccd40cf1a1b11c1 "Fix handling of Linux
> > > systems without struct statfs64" breaks the build on my system (on which
> > > the autoconf macros cannot find statfs64 but I believe that is another
> > > problem).
> > >
> > > gcc -Wall -g -O2 -o strace strace.o syscall.o count.o util.o desc.o
> > > file.o ipc.o io.o ioctl.o mem.o net.o process.o bjm.o quota.o resource.o
> > > signal.o sock.o system.o term.o time.o proc.o scsi.o stream.o
> > > syscall.o:(.rodata+0x4a88): undefined reference to `sys_statfs64'
> > > syscall.o:(.rodata+0x4aa8): undefined reference to `sys_fstatfs64'
> > >
> > > This patch allows me to complete the build (not sure whether tab or
> > > space is best after the define as the file has a mix of both).
> > Such a change is not fail-safe: if configure check failed to recognize
> > struct statfs64 on an architecture where sys_statfs64 is known to exist,
> > then the proposed printargs fallback would just result to degraded
> > statfs64 parser.
> OK, so how do we safely fix the build for platforms without statfs64?
Platforms without statfs64 have no references to sys_statfs64/sys_fstatfs64
> > I wonder why the autoconf test fails to find struct statfs64 on your
> > system.
> Initially it was because I didn't have -D__USE_LARGEFILE64 in the
It is an internal glibc macro which shouldn't be used by applications.
> My guess is that the error is caused by file.c including <linux/types.h>
> and/or <asm/stat.h> instead of <sys/types.h> and <sys/stat.h> but I
> didn't dig deeper. This is Debian Lenny 5.0.4 x86_64 if you want to
This is very strange, strace from HEAD should build on Debian Lenny x86-64
without any issues.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: not available
More information about the Strace-devel