This patch makes OpenSolaris <sys/nvpair.h> buildable outside the compatibility environment, so that it can be installed system-wide, along with <libnvpair.h>, making it easier for third party apps to link with libnvpair.
It's been forwarded to OpenSolaris BTS already:
See also the discussion on GRUB list  about this problem:
 I'm in the process of adding support to GRUB for booting from ZFS
Fix: Patch attached with submission follows:
Over to maintainer(s).
If this wasn't imported into OpenSolaris I suggest a illumos issue gets
For bugs matching the following criteria:
Status: In Progress Changed: (is less than) 2014-06-01
Reset to default assignee and clear in-progress tags.
Mail being skipped
We seem to have ended up in the worst of all possible worlds here. We have files like nvpair.h and libzfs_core.h installed, but they depend on Solaris compat headers that are *not* installed. Worse, we have a libnv.h that exposes an nvlist_t that looks like the one that libzfs_core.h uses, but is not actually compatible.