]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/mntent_cache.c
Fix typo.
[bacula/bacula] / bacula / src / lib / mntent_cache.c
index 8d9aacf84fc6f8346acb7542795049b5815257a1..c130fa2d95d70faeab2bcde1fd4aeabca3ce7d88 100644 (file)
 #include <sys/stat.h>
 
 #if defined(HAVE_GETMNTENT)
-#if defined(HAVE_LINUX_OS) || defined(HAVE_HPUX_OS)
+#if defined(HAVE_LINUX_OS) || defined(HAVE_HPUX_OS) || defined(HAVE_AIX_OS)
 #include <mntent.h>
 #elif defined(HAVE_SUN_OS)
 #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>
@@ -156,7 +159,7 @@ static void refresh_mount_cache(void)
 #if defined(HAVE_GETMNTENT)
    FILE *fp;
    struct stat st;
-#if defined(HAVE_LINUX_OS) || defined(HAVE_HPUX_OS) || defined(HAVE_IRIX_OS)
+#if defined(HAVE_LINUX_OS) || defined(HAVE_HPUX_OS) || defined(HAVE_IRIX_OS) || defined(HAVE_AIX_OS)
    struct mntent *mnt;
 
 #if defined(HAVE_LINUX_OS)
@@ -173,6 +176,10 @@ static void refresh_mount_cache(void)
    if ((fp = setmntent(MOUNTED, "r")) == (FILE *)NULL) {
       return;
    }
+#elif defined(HAVE_AIX_OS)
+   if ((fp = setmntent(MNTTAB, "r")) == (FILE *)NULL) {
+      return;
+   }
 #endif
 
    while ((mnt = getmntent(fp)) != (struct mntent *)NULL) {
@@ -203,10 +210,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;