Description: Fix regression introduced by upstream when adding windows support
Author: Carsten Leonhardt <leo@debian.org>
Bug: http://bugs.bacula.org/view.php?id=2192
Last-Update: 2018-04-24
--- a/src/findlib/fstype.c
+++ b/src/findlib/fstype.c
@@ -93,6 +93,7 @@
  */
 #if defined(HAVE_DARWIN_OS) \
    || defined(HAVE_FREEBSD_OS ) \
+   || defined(HAVE_KFREEBSD_OS ) \
    || defined(HAVE_OPENBSD_OS)
 
 #include <sys/param.h>
@@ -356,7 +357,10 @@
 
 /* Read mtab entries  */
 bool read_mtab(mtab_handler_t *mtab_handler, void *user_ctx)
-{ 
+{
+/* Debian stretch GNU/KFreeBSD has both getmntinfo and getmntent, but
+   only the first seems to work, so we skip over getmntent in this case */
+#ifndef HAVE_KFREEBSD_OS
 #ifdef HAVE_GETMNTENT
    FILE *mntfp;
    struct stat st;
@@ -409,6 +413,7 @@
 #endif
 
 #endif /* HAVE_GETMNTENT */
+#endif /* HAVE_KFREEBSD_OS */
 
 #ifdef HAVE_GETMNTINFO
    struct stat st;
