From 01449abbc679e4610c141ef2e4bc167bfa6c05db Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Sat, 18 Sep 2010 11:13:01 +0200 Subject: [PATCH] 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. --- bacula/src/lib/mntent_cache.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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; -- 2.39.5