pass ARCH down to uClibc
[buildroot.git] / package / strace / strace-4.5.18-statfs64.patch
blobb67f41b0cd4966486f0a6e27b1dfa2252ddd24b9
1 diff -u strace-4.5.18.orig/acinclude.m4 strace-4.5.18/acinclude.m4
2 --- strace-4.5.18.orig/acinclude.m4 2004-04-14 04:21:01.000000000 +0200
3 +++ strace-4.5.18/acinclude.m4 2008-10-28 14:24:30.000000000 +0100
4 @@ -210,6 +210,23 @@
5 fi
6 ])
8 +dnl ### A macro to determine whether statfs64 is defined.
9 +AC_DEFUN([AC_STATFS64],
10 +[AC_MSG_CHECKING(for statfs64 in sys/vfs.h)
11 +AC_CACHE_VAL(ac_cv_type_statfs64,
12 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef LINUX
13 +#include <linux/types.h>
14 +#include <sys/vfs.h>
15 +#endif]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])])
16 +AC_MSG_RESULT($ac_cv_type_statfs64)
17 +if test "$ac_cv_type_statfs64" = yes
18 +then
19 + AC_DEFINE([HAVE_STATFS64], 1,
20 +[Define if statfs64 is available in sys/vfs.h.])
21 +fi
22 +])
25 dnl ### A macro to determine if off_t is a long long
26 AC_DEFUN([AC_OFF_T_IS_LONG_LONG],
27 [AC_MSG_CHECKING(for long long off_t)
28 diff -u strace-4.5.18.orig/configure.ac strace-4.5.18/configure.ac
29 --- strace-4.5.18.orig/configure.ac 2008-08-28 23:15:56.000000000 +0200
30 +++ strace-4.5.18/configure.ac 2008-10-28 14:24:41.000000000 +0100
31 @@ -170,6 +170,7 @@
32 struct stat.st_level,
33 struct stat.st_rdev])
34 AC_STAT64
35 +AC_STATFS64
37 AC_TYPE_SIGNAL
38 AC_TYPE_UID_T
39 diff -u strace-4.5.18.orig/file.c strace-4.5.18/file.c
40 --- strace-4.5.18.orig/file.c 2008-08-01 03:13:10.000000000 +0200
41 +++ strace-4.5.18/file.c 2008-10-28 14:27:03.000000000 +0100
42 @@ -1704,13 +1704,17 @@
43 return 0;
46 -#ifdef LINUX
47 +#if defined LINUX && defined HAVE_STATFS64
48 static void
49 printstatfs64(tcp, addr)
50 struct tcb *tcp;
51 long addr;
53 +#ifdef HAVE_STAT64
54 struct statfs64 statbuf;
55 +#else
56 + struct statfs statbuf;
57 +#endif
59 if (syserror(tcp) || !verbose(tcp)) {
60 tprintf("%#lx", addr);