From: Marco van Wieringen Date: Sat, 18 Sep 2010 09:13:01 +0000 (+0200) Subject: Tweak BSD mntinfo handling a bit as it seems all BSD 4.4 derived version use struct... X-Git-Tag: Release-5.2.1~1098 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=01449abbc679e4610c141ef2e4bc167bfa6c05db;p=bacula%2Fbacula Tweak BSD mntinfo handling a bit as it seems all BSD 4.4 derived version use struct statfs only NetBSD switched to using struct statvfs. This coding should be little easier to read as much as is possible with these highly OS dependend interfaces. --- diff --git a/bacula/src/lib/mntent_cache.c b/bacula/src/lib/mntent_cache.c index 8d9aacf84f..147135b24e 100644 --- a/bacula/src/lib/mntent_cache.c +++ b/bacula/src/lib/mntent_cache.c @@ -74,13 +74,16 @@ #include #endif /* HAVE_GETMNTENT */ #elif defined(HAVE_GETMNTINFO) -#if defined(HAVE_DARWIN_OS) || defined(HAVE_FREEBSD_OS) +#if defined(HAVE_OPENBSD_OS) #include -#include -#include -#else +#include +#elif defined(HAVE_NETBSD_OS) #include #include +#else +#include +#include +#include #endif #elif defined(HAVE_AIX_OS) #include @@ -203,10 +206,10 @@ static void refresh_mount_cache(void) #elif defined(HAVE_GETMNTINFO) int cnt; struct stat st; -#if defined(HAVE_DARWIN_OS) || defined(HAVE_FREEBSD_OS) - struct statfs *mntinfo; -#else +#if defined(HAVE_NETBSD_OS) struct statvfs *mntinfo; +#else + struct statfs *mntinfo; #endif #if defined(ST_NOWAIT) int flags = ST_NOWAIT;