patches/strace/4.5.17/140-statfs64-check.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 02 18:28:10 2011 +0200 (2011-08-02)
changeset 2590 b64cfb67944e
parent 747 d3e603e7c17c
permissions -rw-r--r--
scripts/functions: svn retrieval first tries the mirror for tarballs

The svn download helper looks for the local tarballs dir to see if it
can find a pre-downloaded tarball, and if it does not find it, does
the actual fetch to upstream via svn.

In the process, it does not even try to get a tarball from the local
mirror, which can be useful if the mirror has been pre-populated
manually (or with a previously downloaded tree).

Fake a tarball get with the standard tarball-download helper, but
without specifying any upstream URL, which makes the helper directly
try the LAN mirror.

Of course, if no mirror is specified, no URL wil be available, and
the standard svn retrieval will kick in.

Reported-by: ANDY KENNEDY <ANDY.KENNEDY@adtran.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 Original patch from gentoo: ../../dev/crosstool-NG/ct-ng.trunk/patches/strace/4.5.17/140-statfs64-check.patch
     2 -= BEGIN original header =-
     3 diff -dur strace-4.5.16.orig/acinclude.m4 strace-4.5.16/acinclude.m4
     4 -= END original header =-
     5 diff -durN strace-4.5.17.orig/acinclude.m4 strace-4.5.17/acinclude.m4
     6 --- strace-4.5.17.orig/acinclude.m4	2004-04-14 04:21:01.000000000 +0200
     7 +++ strace-4.5.17/acinclude.m4	2008-10-24 21:30:13.000000000 +0200
     8 @@ -210,6 +210,26 @@
     9  fi
    10  ])
    11  
    12 +dnl ### A macro to determine whether statfs64 is defined.
    13 +AC_DEFUN([AC_STATFS64],
    14 +[AC_MSG_CHECKING(for statfs64 in sys/(statfs|vfs).h)
    15 +AC_CACHE_VAL(ac_cv_type_statfs64,
    16 +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef LINUX
    17 +#include <linux/types.h>
    18 +#include <sys/statfs.h>
    19 +#else
    20 +#include <sys/vfs.h>
    21 +#endif]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])])
    22 +AC_MSG_RESULT($ac_cv_type_statfs64)
    23 +if test "$ac_cv_type_statfs64" = yes
    24 +then
    25 +	AC_DEFINE([HAVE_STATFS64], 1,
    26 +[Define if statfs64 is available in sys/statfs.h or sys/vfs.h.])
    27 +fi
    28 +])
    29 +
    30 +
    31 +
    32  dnl ### A macro to determine if off_t is a long long
    33  AC_DEFUN([AC_OFF_T_IS_LONG_LONG],
    34  [AC_MSG_CHECKING(for long long off_t)
    35 diff -durN strace-4.5.17.orig/configure.ac strace-4.5.17/configure.ac
    36 --- strace-4.5.17.orig/configure.ac	2008-07-22 02:42:29.000000000 +0200
    37 +++ strace-4.5.17/configure.ac	2008-10-24 21:30:13.000000000 +0200
    38 @@ -169,6 +169,7 @@
    39  		  struct stat.st_level,
    40  		  struct stat.st_rdev])
    41  AC_STAT64
    42 +AC_STATFS64
    43  
    44  AC_TYPE_SIGNAL
    45  AC_TYPE_UID_T
    46 diff -durN strace-4.5.17.orig/file.c strace-4.5.17/file.c
    47 --- strace-4.5.17.orig/file.c	2008-05-20 06:56:18.000000000 +0200
    48 +++ strace-4.5.17/file.c	2008-10-24 21:30:13.000000000 +0200
    49 @@ -1703,7 +1703,7 @@
    50  	return 0;
    51  }
    52  
    53 -#ifdef LINUX
    54 +#ifdef HAVE_STATFS64
    55  static void
    56  printstatfs64(tcp, addr)
    57  struct tcb *tcp;