build: Rename HAVE_LIBZFS to USE_LIBZFS

The HAVE_LIBZFS is defined by libzfs test and hence conflicts with
manual definition. On NetBSD it ends up detecting zfs but not detecting
nvpair and creates confusion. Split them.

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Vladimir Serbinenko authored and Daniel Kiper committed 2023-12-12 18:01:55 +01:00
1 parent e4dbe5cfa4
commit 3d4cb5a432
3 files changed
+7 -9

No files matched your search

+2 -2
View File
@@ -53,7 +53,7 @@
#include <grub/osdep/major.h>
#if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
#ifdef USE_LIBZFS
# include <grub/util/libzfs.h>
# include <grub/util/libnvpair.h>
#endif
@@ -158,7 +158,7 @@ grub_util_find_root_devices_from_poolname (char *poolname)
size_t ndevices = 0;
size_t devices_allocated = 0;
#if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
#ifdef USE_LIBZFS
zpool_handle_t *zpool;
libzfs_handle_t *libzfs;
nvlist_t *config, *vdev_tree;