From: Kern Sibbald Date: Sun, 20 Dec 2015 16:12:56 +0000 (+0100) Subject: Manually apply patch in bug #2156 to allow building on KFreeBSD X-Git-Tag: Release-7.4.0~94 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7b7d32c5126cb57a3aac8bfdac618384763f9b62;p=bacula%2Fbacula Manually apply patch in bug #2156 to allow building on KFreeBSD --- diff --git a/bacula/autoconf/config.h.in b/bacula/autoconf/config.h.in index 0aca2b77b9..00a8058037 100644 --- a/bacula/autoconf/config.h.in +++ b/bacula/autoconf/config.h.in @@ -134,6 +134,7 @@ /* OSes */ #undef HAVE_LINUX_OS #undef HAVE_FREEBSD_OS +#undef HAVE_KFREEBSD_OS #undef HAVE_NETBSD_OS #undef HAVE_OPENBSD_OS #undef HAVE_BSDI_OS diff --git a/bacula/src/filed/backup.c b/bacula/src/filed/backup.c index a8d842359c..9d2b58f106 100644 --- a/bacula/src/filed/backup.c +++ b/bacula/src/filed/backup.c @@ -627,7 +627,7 @@ static int send_data(bctx_t &bctx, int stream) if ((bctx.ff_pkt->flags & FO_SPARSE) || (bctx.ff_pkt->flags & FO_OFFSETS)) { bctx.rbuf += OFFSET_FADDR_SIZE; bctx.rsize -= OFFSET_FADDR_SIZE; -#ifdef HAVE_FREEBSD_OS +#if defined(HAVE_FREEBSD_OS) || defined(__FreeBSD_kernel__) /** * To read FreeBSD partitions, the read size must be * a multiple of 512. diff --git a/bacula/src/findlib/find_one.c b/bacula/src/findlib/find_one.c index d0c1fbf848..910ae6f680 100644 --- a/bacula/src/findlib/find_one.c +++ b/bacula/src/findlib/find_one.c @@ -765,7 +765,7 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, * a block device, we do a raw backup of it or if it is * a fifo, we simply read it. */ -#ifdef HAVE_FREEBSD_OS +#if defined(HAVE_FREEBSD_OS) || defined(__FreeBSD_kernel__) /* * On FreeBSD, all block devices are character devices, so * to be able to read a raw disk, we need the check for diff --git a/bacula/src/findlib/fstype.c b/bacula/src/findlib/fstype.c index d90e5fd8ba..41c874445f 100644 --- a/bacula/src/findlib/fstype.c +++ b/bacula/src/findlib/fstype.c @@ -103,6 +103,7 @@ bool fstype_cmp(FF_PKT *ff_pkt, const char *fsname) */ #if defined(HAVE_DARWIN_OS) \ || defined(HAVE_FREEBSD_OS ) \ + || defined(HAVE_KFREEBSD_OS ) \ || defined(HAVE_OPENBSD_OS) #include diff --git a/bacula/src/version.h b/bacula/src/version.h index 677a81f69c..0a9d0a3ffd 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -95,7 +95,7 @@ */ /* #define USE_LOCKMGR_SAFEKILL */ -#if !HAVE_LINUX_OS && !HAVE_SUN_OS && !HAVE_DARWIN_OS && !HAVE_FREEBSD_OS +#if !HAVE_LINUX_OS && !HAVE_SUN_OS && !HAVE_DARWIN_OS && !HAVE_FREEBSD_OS && !HAVE_KFREEBSD_OS # undef _USE_LOCKMGR #endif