[PATCH] fix build on systems that do not implement statfs64

Adrien Kunysz adrien at kunysz.be
Sun Mar 28 17:01:47 UTC 2010

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

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).

Please CC me in reply as I am not subscribed to the list.

diff --git a/linux/dummy.h b/linux/dummy.h
index 92e6886..ee4deb5 100644
--- a/linux/dummy.h
+++ b/linux/dummy.h
@@ -124,6 +124,11 @@
 #define sys_oldlstat           printargs
+#ifndef HAVE_STATFS64
+#define        sys_statfs64            printargs
+#define        sys_fstatfs64           printargs
 #if DONE
 #define sys_oldselect          printargs
 #define        sys_msync               printargs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20100328/898c213d/attachment.bin>

More information about the Strace-devel mailing list