/* 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
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.
* 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
*/
#if defined(HAVE_DARWIN_OS) \
|| defined(HAVE_FREEBSD_OS ) \
+ || defined(HAVE_KFREEBSD_OS ) \
|| defined(HAVE_OPENBSD_OS)
#include <sys/param.h>
*/
/* #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