From b035c6f79db798582bffc770f88c51407dd4fdb4 Mon Sep 17 00:00:00 2001 From: Alex Wilson Date: Mon, 12 Feb 2024 15:47:38 +1000 Subject: [PATCH] illumos: silence warning from nvlist char * types --- pivy-zfs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pivy-zfs.c b/pivy-zfs.c index 1903b0a..2758356 100644 --- a/pivy-zfs.c +++ b/pivy-zfs.c @@ -208,7 +208,15 @@ cmd_unlock(const char *fsname) zfs_handle_t *ds; nvlist_t *props, *prop; char *description; + /* + * illumos libnvpair has the output args as 'char **' + * but on ZoL they changed it to 'const char **' + */ +#if defined(__sun) + char *b64; +#else const char *b64; +#endif char *nb64; struct sshbuf *buf; struct ebox *ebox, *nebox; @@ -391,7 +399,11 @@ cmd_rekey(const char *fsname) zfs_handle_t *ds; nvlist_t *props, *prop; char *description; +#if defined(__sun) + char *b64; +#else const char *b64; +#endif char *nb64; struct sshbuf *buf; struct ebox *ebox = NULL, *nebox;