]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-ukernel-use-fsblkcnt-20090513
authorDerrick Brashear <shadow@dementia.org>
Fri, 22 May 2009 17:31:43 +0000 (17:31 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 22 May 2009 17:31:43 +0000 (17:31 +0000)
LICENSE IPL10
FIXES 124681

blkcnt_t doesn't exist on fbsd, macos 10.3, and isn't really the right type.
this is the right type, but also can be missing. test appropriately.

(cherry picked from commit 070f02923cfa4e01ccb754928cdd4d02bec48720)

acinclude.m4
src/afs/UKERNEL/sysincludes.h

index e3063fb1a29b4fe029fd841dd6408a7555920424..cbedcfc297f3535f4643702a6a3a43b244cb311a 100644 (file)
@@ -1342,7 +1342,20 @@ AC_CHECK_HEADERS(netinet/in.h netdb.h sys/fcntl.h sys/mnttab.h sys/mntent.h)
 AC_CHECK_HEADERS(mntent.h sys/vfs.h sys/param.h sys/fs_types.h sys/fstyp.h)
 AC_CHECK_HEADERS(sys/mount.h strings.h termios.h signal.h poll.h sys/pag.h)
 AC_CHECK_HEADERS(windows.h malloc.h winsock2.h direct.h io.h sys/user.h)
-AC_CHECK_HEADERS(security/pam_modules.h siad.h usersec.h ucontext.h regex.h)
+AC_CHECK_HEADERS(security/pam_modules.h siad.h usersec.h ucontext.h regex.h sys/statvfs.h sys/statfs.h sys/bitypes.h)
+
+AC_CHECK_TYPES([fsblkcnt_t],,,[
+#include <sys/types.h>
+#ifdef HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif
+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
+#endif
+])
 
 if test "$ac_cv_header_security_pam_modules_h" = yes -a "$enable_pam" = yes; then
        HAVE_PAM="yes"
index ebe576ee859f642eb2a99dfa92eea28a81e64b07..86420017c2f377c3af22ae4485e396d7a0c3d93e 100644 (file)
 #endif
 #endif /* AFS_USR_DARWIN_ENV || AFS_USR_FBSD_ENV */
 
+#ifdef HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif
+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
+#endif
+
+#ifndef HAVE_FSBLKCNT_T
+typedef unsigned int fsblkcnt_t;
+#endif
+
 #ifdef AFS_AFSDB_ENV
 #include <arpa/nameser.h>
 #include <resolv.h>
@@ -1038,7 +1052,7 @@ struct usr_vattr {
     struct timeval va_ctime;
     dev_t va_rdev;
     unsigned long va_blocksize;
-    blkcnt_t va_blocks;
+    fsblkcnt_t va_blocks;
     unsigned long va_vcode;
 };