2 This patch corrects a compile problem because of no statfs()
3 on NetBSD. The patch was submitted by kardel with bug 258.
5 Apply the patch to version 1.36.2 with:
8 patch -p0 <1.36.2-netbsd.patch
12 Index: src/findlib/fstype.c
13 ===================================================================
14 RCS file: /cvsroot/bacula/bacula/src/findlib/fstype.c,v
15 retrieving revision 1.7.2.2
16 diff -u -r1.7.2.2 fstype.c
17 --- src/findlib/fstype.c 25 Feb 2005 09:47:06 -0000 1.7.2.2
18 +++ src/findlib/fstype.c 15 Mar 2005 14:01:44 -0000
21 #if defined(HAVE_DARWIN_OS) \
22 || defined(HAVE_FREEBSD_OS ) \
23 - || defined(HAVE_NETBSD_OS) \
24 || defined(HAVE_OPENBSD_OS)
26 #include <sys/param.h>
28 Dmsg1(50, "statfs() failed for \"%s\"\n", fname);
31 +#elif defined(HAVE_NETBSD_OS)
32 +#include <sys/param.h>
33 +#include <sys/mount.h>
35 +bool fstype(const char *fname, char *fs, int fslen)
38 + if (statvfs(fname, &st) == 0) {
39 + bstrncpy(fs, st.f_fstypename, fslen);
42 + Dmsg1(50, "statfs() failed for \"%s\"\n", fname);
45 #elif defined(HAVE_HPUX_OS) \
46 || defined(HAVE_IRIX_OS)