summaryrefslogtreecommitdiff
path: root/usr/src/lib/libdevice/devctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libdevice/devctl.c')
-rw-r--r--usr/src/lib/libdevice/devctl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr/src/lib/libdevice/devctl.c b/usr/src/lib/libdevice/devctl.c
index da48342..8bea9bc 100644
--- a/usr/src/lib/libdevice/devctl.c
+++ b/usr/src/lib/libdevice/devctl.c
@@ -37,7 +37,15 @@
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
-#include <sys/nvpair.h>
+
+#if defined(HAVE_LIBNVPAIR_H)
+# include <libnvpair.h>
+#elif defined(HAVE_SYS_NVPAIR_H)
+# include <sys/nvpair.h>
+#else
+# error Cannot find libnvpair headers
+#endif
+
#include "libdevice.h"
static int _libdevice_debug = 0;