]> git.sur5r.net Git - bacula/bacula/commitdiff
Tweak BSD mntinfo handling a bit as it seems all BSD 4.4 derived version use struct...
authorMarco van Wieringen <mvw@planets.elm.net>
Sat, 18 Sep 2010 09:13:01 +0000 (11:13 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 20 Sep 2010 16:34:10 +0000 (18:34 +0200)
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

index 8d9aacf84fc6f8346acb7542795049b5815257a1..147135b24e16fe9b038a328554c9291e582cd081 100644 (file)
 #include <sys/mnttab.h>
 #endif /* HAVE_GETMNTENT */
 #elif defined(HAVE_GETMNTINFO)
-#if defined(HAVE_DARWIN_OS) || defined(HAVE_FREEBSD_OS)
+#if defined(HAVE_OPENBSD_OS)
 #include <sys/param.h>
-#include <sys/ucred.h> 
-#include <sys/mount.h> 
-#else
+#include <sys/mount.h>
+#elif defined(HAVE_NETBSD_OS)
 #include <sys/types.h>
 #include <sys/statvfs.h>
+#else
+#include <sys/param.h>
+#include <sys/ucred.h>
+#include <sys/mount.h>
 #endif
 #elif defined(HAVE_AIX_OS)
 #include <fshelp.h>
@@ -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;