From e63a27cc1c2e195ad44b00ebdf34b4f758f07b02 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 25 May 2018 10:35:22 +0200 Subject: [PATCH] Apply patch from Leo to fix bug 2192 --- bacula/src/findlib/fstype.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bacula/src/findlib/fstype.c b/bacula/src/findlib/fstype.c index 9478463fb2..07cf943431 100644 --- a/bacula/src/findlib/fstype.c +++ b/bacula/src/findlib/fstype.c @@ -93,6 +93,7 @@ void add_mtab_item(void *user_ctx, struct stat *st, const char *fstype, */ #if defined(HAVE_DARWIN_OS) \ || defined(HAVE_FREEBSD_OS ) \ + || defined(HAVE_KFREEBSD_OS ) \ || defined(HAVE_OPENBSD_OS) #include @@ -356,7 +357,10 @@ bool fstype(FF_PKT *ff_pkt, char *fs, int fslen) /* 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 @@ bool read_mtab(mtab_handler_t *mtab_handler, void *user_ctx) #endif #endif /* HAVE_GETMNTENT */ +#endif /* HAVE_KFREEBSD_OS */ #ifdef HAVE_GETMNTINFO struct stat st; -- 2.39.2