Author: vlendec Date: 2006-07-06 16:59:43 +0000 (Thu, 06 Jul 2006) New Revision: 16837
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16837 Log: Finally found a Linux version that shows bug 3841. SuSE 7.0 does it :-) Attempt to fix it. Volker Modified: trunk/source/configure.in trunk/source/smbd/statvfs.c Changeset: Modified: trunk/source/configure.in =================================================================== --- trunk/source/configure.in 2006-07-06 13:38:41 UTC (rev 16836) +++ trunk/source/configure.in 2006-07-06 16:59:43 UTC (rev 16837) @@ -4579,6 +4579,16 @@ fi fi +# smbd/statvfs.c assumes that statvfs.f_fsid is an integer. +# This is not the case on ancient Linux systems. + +AC_CACHE_CHECK([that statvfs.f_fsid is an integer],samba_cv_fsid_int, [ + AC_TRY_COMPILE([#include <sys/statvfs.h>],[struct statvfs buf; buf.f_fsid = 0], + samba_cv_fsid_int=yes,samba_cv_fsid_int=no)]) +if test x"$samba_cv_fsid_int" = x"yes"; then + AC_DEFINE(HAVE_FSID_INT, 1, [Whether statvfs.f_fsid is an integer]) +fi + if test $space = no; then # DEC Alpha running OSF/1 AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) Modified: trunk/source/smbd/statvfs.c =================================================================== --- trunk/source/smbd/statvfs.c 2006-07-06 13:38:41 UTC (rev 16836) +++ trunk/source/smbd/statvfs.c 2006-07-06 16:59:43 UTC (rev 16837) @@ -21,7 +21,7 @@ #include "includes.h" -#if defined(LINUX) +#if defined(LINUX) && defined(HAVE_FSID_INT) static int linux_statvfs(const char *path, vfs_statvfs_struct *statbuf) { struct statvfs statvfs_buf; @@ -51,7 +51,7 @@ */ int sys_statvfs(const char *path, vfs_statvfs_struct *statbuf) { -#if defined(LINUX) +#if defined(LINUX) && defined(HAVE_FSID_INT) return linux_statvfs(path, statbuf); #else /* BB change this to return invalid level */
