kumquat-buildroot/package/strace/strace-statfs64-check.patch
Hans-Christian Egtvedt 555474f2da strace: fix AVR32 arch patches and refresh all patches to apply clean
This patch updates the AVR32 arch patches for strace 4.5.18 and refreshes all
the other patches so they apply clean.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
2009-01-08 09:24:32 +00:00

51 lines
1.1 KiB
Diff

--- a/acinclude.m4
+++ b/acinclude.m4
@@ -210,6 +210,26 @@ then
fi
])
+dnl ### A macro to determine whether statfs64 is defined.
+AC_DEFUN([AC_STATFS64],
+[AC_MSG_CHECKING(for statfs64 in sys/(statfs|vfs).h)
+AC_CACHE_VAL(ac_cv_type_statfs64,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef LINUX
+#include <linux/types.h>
+#include <sys/statfs.h>
+#else
+#include <sys/vfs.h>
+#endif]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])])
+AC_MSG_RESULT($ac_cv_type_statfs64)
+if test "$ac_cv_type_statfs64" = yes
+then
+ AC_DEFINE([HAVE_STATFS64], 1,
+[Define if statfs64 is available in sys/statfs.h or sys/vfs.h.])
+fi
+])
+
+
+
dnl ### A macro to determine if off_t is a long long
AC_DEFUN([AC_OFF_T_IS_LONG_LONG],
[AC_MSG_CHECKING(for long long off_t)
--- a/configure.ac
+++ b/configure.ac
@@ -170,6 +170,7 @@ AC_CHECK_MEMBERS([struct stat.st_blksize
struct stat.st_level,
struct stat.st_rdev])
AC_STAT64
+AC_STATFS64
AC_TYPE_SIGNAL
AC_TYPE_UID_T
--- a/file.c
+++ b/file.c
@@ -1704,7 +1704,7 @@ struct tcb *tcp;
return 0;
}
-#ifdef LINUX
+#ifdef HAVE_STATFS64
static void
printstatfs64(tcp, addr)
struct tcb *tcp;