Use AC_CHECK_TYPES to check for struct statfs64
* m4/statfs.m4: Remove. * configure.ac (AC_STATFS64): Remove. (AC_CHECK_TYPES): Add struct statfs64. * statfs.c: Replace HAVE_STATFS64 with HAVE_STRUCT_STATFS64.
This commit is contained in:
parent
7b9bc44e63
commit
9e6a7bf202
@ -191,7 +191,6 @@ AC_CHECK_MEMBERS(m4_normalize([
|
||||
struct stat.st_gen,
|
||||
struct stat.st_rdev
|
||||
]))
|
||||
AC_STATFS64
|
||||
|
||||
AC_TYPE_SIGNAL
|
||||
AC_TYPE_UID_T
|
||||
@ -262,6 +261,7 @@ AC_CHECK_MEMBERS([struct msghdr.msg_control],,, [#include <sys/socket.h>])
|
||||
AC_CHECK_TYPES([struct stat64],,, [#include <sys/types.h>
|
||||
#include <asm/stat.h>])
|
||||
AC_CHECK_TYPES([struct __old_kernel_stat],,, [#include <asm/stat.h>])
|
||||
AC_CHECK_TYPES([struct statfs64],,, [#include <sys/vfs.h>])
|
||||
|
||||
AC_CHECK_TYPES([struct pt_all_user_regs, struct ia64_fpreg, struct ptrace_peeksiginfo_args],,,
|
||||
[#include <sys/ptrace.h>])
|
||||
|
15
m4/statfs.m4
15
m4/statfs.m4
@ -1,15 +0,0 @@
|
||||
dnl ### A macro to determine whether statfs64 is defined.
|
||||
AC_DEFUN([AC_STATFS64],
|
||||
[AC_MSG_CHECKING(for statfs64 in sys/vfs.h)
|
||||
AC_CACHE_VAL(ac_cv_type_statfs64,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <linux/types.h>
|
||||
#include <sys/vfs.h>
|
||||
]], [[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/vfs.h.])
|
||||
fi
|
||||
])
|
4
statfs.c
4
statfs.c
@ -83,7 +83,7 @@ sys_fstatfs(struct tcb *tcp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef HAVE_STATFS64
|
||||
#ifdef HAVE_STRUCT_STATFS64
|
||||
static void
|
||||
printstatfs64(struct tcb *tcp, long addr)
|
||||
{
|
||||
@ -197,7 +197,7 @@ sys_fstatfs64(struct tcb *tcp)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* HAVE_STATFS64 */
|
||||
#endif /* HAVE_STRUCT_STATFS64 */
|
||||
|
||||
#ifdef ALPHA
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user