From 485172f537e195e3d5ca9467192f73c1893ab537 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Fri, 6 Dec 2019 19:33:39 +0000 Subject: [PATCH] libbe: fix build against sysutils/openzfs, part 1 This is the half of the changes required that work as-is with both in-tree ZFS and the new hotness, sysutils/openzfs. Highlights are less dependency on header pollution (from somewhere) and using 'mnttab' instead of 'extmnttab'. In the in-tree ZFS, the latter is a #define for the former, but in the port extmnttab is actually a distinct struct that's a super-set of mnttab. We really want mnttab here anyways, so just use it. --- lib/libbe/be.c | 5 ++++- lib/libbe/be_access.c | 2 ++ lib/libbe/be_info.c | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/libbe/be.c b/lib/libbe/be.c index fd7d05c408eb..6f56999a8b9d 100644 --- a/lib/libbe/be.c +++ b/lib/libbe/be.c @@ -34,6 +34,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include #include @@ -67,7 +70,7 @@ static int be_locate_rootfs(libbe_handle_t *lbh) { struct statfs sfs; - struct extmnttab entry; + struct mnttab entry; zfs_handle_t *zfs; /* diff --git a/lib/libbe/be_access.c b/lib/libbe/be_access.c index 9c267bd2f9a6..72ee48b1ca7a 100644 --- a/lib/libbe/be_access.c +++ b/lib/libbe/be_access.c @@ -31,6 +31,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include "be.h" #include "be_impl.h" diff --git a/lib/libbe/be_info.c b/lib/libbe/be_info.c index 1b49fe89044e..b1625e68fc15 100644 --- a/lib/libbe/be_info.c +++ b/lib/libbe/be_info.c @@ -30,6 +30,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include "be.h" #include "be_impl.h"