define aok in libnvpair which is linked to all zfs libraries that need aok

This removes the circular dependency of libnvpair on libzfs / libzpool.

PR:		199811
Obtained from:	bapt
MFC after:	23 days
This commit is contained in:
Andriy Gapon 2015-09-28 15:25:36 +00:00
parent 9875367b9a
commit 9b977fcea2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288340
3 changed files with 10 additions and 1 deletions

View File

@ -55,7 +55,6 @@
#include "zfs_prop.h" #include "zfs_prop.h"
#include "zfeature_common.h" #include "zfeature_common.h"
int aok;
int int
libzfs_errno(libzfs_handle_t *hdl) libzfs_errno(libzfs_handle_t *hdl)

View File

@ -45,7 +45,9 @@
* Emulation of kernel services in userland. * Emulation of kernel services in userland.
*/ */
#ifndef __FreeBSD__
int aok; int aok;
#endif
uint64_t physmem; uint64_t physmem;
vnode_t *rootdir = (vnode_t *)0xabcd1234; vnode_t *rootdir = (vnode_t *)0xabcd1234;
char hw_serial[HW_HOSTID_LEN]; char hw_serial[HW_HOSTID_LEN];

View File

@ -44,6 +44,14 @@
#endif #endif
#define skip_whitespace(p) while ((*(p) == ' ') || (*(p) == '\t')) p++ #define skip_whitespace(p) while ((*(p) == ' ') || (*(p) == '\t')) p++
#if defined(__FreeBSD__) && !defined(_KERNEL)
/*
* libnvpair is the lowest commen denominator for ZFS related libraries,
* defining aok here makes it usable by all ZFS related libraries
*/
int aok;
#endif
/* /*
* nvpair.c - Provides kernel & userland interfaces for manipulating * nvpair.c - Provides kernel & userland interfaces for manipulating
* name-value pairs. * name-value pairs.