diff options
author | Don Brady <[email protected]> | 2018-11-06 18:47:52 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-11-06 17:47:52 -0800 |
commit | 95692927f28479c2d3cf0c1e60ad278c8748377c (patch) | |
tree | c14eff789a40f6fdff69cd6117e45e58f1c1bec4 /include/libzutil.h | |
parent | f0f978654581cea4cc042e7f185e1843d727acdb (diff) |
Fix libudev dependency in libzutil
ZFS should be able to build without libudev installed. The recent
change for libzutil inadvertently broke that. Make the libudev code
conditional in zutil_import.c to resolve the build failure.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Don Brady <[email protected]>
Closes #8097
Diffstat (limited to 'include/libzutil.h')
-rw-r--r-- | include/libzutil.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/libzutil.h b/include/libzutil.h index 39fc5554b..69d1e6bbd 100644 --- a/include/libzutil.h +++ b/include/libzutil.h @@ -79,10 +79,16 @@ extern const char * const * zpool_default_search_paths(size_t *count); extern int zpool_read_label(int, nvlist_t **, int *); extern int zpool_label_disk_wait(const char *, int); +#ifdef HAVE_LIBUDEV struct udev_device; extern int zfs_device_get_devid(struct udev_device *, char *, size_t); extern int zfs_device_get_physical(struct udev_device *, char *, size_t); +#else +#define zfs_device_get_devid(dev, bufptr, buflen) (ENODATA) +#define zfs_device_get_physical(dev, bufptr, buflen) (ENODATA) +#endif + extern void update_vdev_config_dev_strs(nvlist_t *); /* @@ -108,7 +114,7 @@ extern char *zfs_get_enclosure_sysfs_path(const char *); #ifdef HAVE_LIBUDEV extern boolean_t is_mpath_whole_disk(const char *); #else -#define is_mpath_whole_disk(path) (B_FALSE); +#define is_mpath_whole_disk(path) (B_FALSE) #endif /* |