patches/strace/4.5.15/150-statfs64-check.patch
author Cody P Schafer <dev@codyps.com>
Mon May 12 00:02:13 2014 +0200 (2014-05-12)
changeset 3322 eb13867a034c
parent 746 b150d6f590fc
permissions -rw-r--r--
arch/powerpc: add powerpc64le support

Technically, I don't forbid powerpcle support either, but I'm not sure that
there is any library/compiler support for that at the moment (though the hw
technically makes it possible).

powerpc64le needs glibc 2.19 and gcc 4.9. I haven't looked into the support
tools, but at least gdb 7.5 is too old (7.7.1 definitely has support).

Also make powerpc64 non-experimental. It's practically old at this point.

Signed-off-by: Cody P Schafer <dev@codyps.com>
[yann.morin.1998@free.fr: use ${target_endian_le} and ${target_bits_64}]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <64bfbbced9dd8f62e0d6.1399801945@gun>
Patchwork-Id: 347775
yann@257
     1
diff -dur strace-4.5.15.orig/acinclude.m4 strace-4.5.15/acinclude.m4
yann@257
     2
--- strace-4.5.15.orig/acinclude.m4	2004-04-14 04:21:01.000000000 +0200
yann@257
     3
+++ strace-4.5.15/acinclude.m4	2007-07-14 19:25:25.000000000 +0200
yann@257
     4
@@ -210,6 +210,26 @@
yann@257
     5
 fi
yann@257
     6
 ])
yann@257
     7
 
yann@257
     8
+dnl ### A macro to determine whether statfs64 is defined.
yann@257
     9
+AC_DEFUN([AC_STATFS64],
yann@257
    10
+[AC_MSG_CHECKING(for statfs64 in sys/(statfs|vfs).h)
yann@257
    11
+AC_CACHE_VAL(ac_cv_type_statfs64,
yann@257
    12
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef LINUX
yann@257
    13
+#include <linux/types.h>
yann@257
    14
+#include <sys/statfs.h>
yann@257
    15
+#else
yann@257
    16
+#include <sys/vfs.h>
yann@257
    17
+#endif]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])])
yann@257
    18
+AC_MSG_RESULT($ac_cv_type_statfs64)
yann@257
    19
+if test "$ac_cv_type_statfs64" = yes
yann@257
    20
+then
yann@257
    21
+	AC_DEFINE([HAVE_STATFS64], 1,
yann@257
    22
+[Define if statfs64 is available in sys/statfs.h or sys/vfs.h.])
yann@257
    23
+fi
yann@257
    24
+])
yann@257
    25
+
yann@257
    26
+
yann@257
    27
+
yann@257
    28
 dnl ### A macro to determine if off_t is a long long
yann@257
    29
 AC_DEFUN([AC_OFF_T_IS_LONG_LONG],
yann@257
    30
 [AC_MSG_CHECKING(for long long off_t)
yann@257
    31
diff -dur strace-4.5.15.orig/configure.ac strace-4.5.15/configure.ac
yann@257
    32
--- strace-4.5.15.orig/configure.ac	2007-01-11 12:37:55.000000000 +0100
yann@257
    33
+++ strace-4.5.15/configure.ac	2007-07-14 19:25:25.000000000 +0200
yann@257
    34
@@ -169,6 +169,7 @@
yann@257
    35
 		  struct stat.st_level,
yann@257
    36
 		  struct stat.st_rdev])
yann@257
    37
 AC_STAT64
yann@257
    38
+AC_STATFS64
yann@257
    39
 
yann@257
    40
 AC_TYPE_SIGNAL
yann@257
    41
 AC_TYPE_UID_T
yann@257
    42
diff -dur strace-4.5.15.orig/file.c strace-4.5.15/file.c
yann@257
    43
--- strace-4.5.15.orig/file.c	2007-01-15 21:25:52.000000000 +0100
yann@257
    44
+++ strace-4.5.15/file.c	2007-07-14 19:25:25.000000000 +0200
yann@257
    45
@@ -1635,7 +1635,7 @@
yann@257
    46
 	return 0;
yann@257
    47
 }
yann@257
    48
 
yann@257
    49
-#ifdef LINUX
yann@257
    50
+#ifdef HAVE_STATFS64
yann@257
    51
 static void
yann@257
    52
 printstatfs64(tcp, addr)
yann@257
    53
 struct tcb *tcp;