cddl: Makefiles used to build userland libraries and utilities

Import cddl/ directory as-is from FreeBSD.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/compat: OpenSolaris kernel API compatability layer

Taken 'sys/cddl/compat' directory as-is from FreeBSD.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/contrib: kernel code taken from OpenSolaris used by ZFS

Take 'sys/cddl/contrib' directory as-is from FreeBSD.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/Makefile: Bring in from FreeBSD sys/modules/zfs

Bring in from FreeBSD as-is.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/Makefile: Trim out some bits and fix path

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/sys/elf.h: Solaris compatibility header

Wraps up the inclusion of some usual headers in a place where
OpenSolaris derived code can find.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
hook up ZFS Makefiles into Dfly Makefile system

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
cddl/*/Makefile: Deal with src.opts.mk

In DragonflyBSD we don't have 'src.opts.mk' for MK_FOO like FreeBSD
has. Trim that out of the Makefiles with tests and dtrace bits.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
cddl/*/Makefile: Change MK_FOO -> NO_FOO

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/compat/opensolaris: Dfly supports DIOCGPART for ioctl

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/sys/sdt.h: Missing header in ZFS port

Probably can prune this latter.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
cddl/lib/Makefile: Comment out libctf and libnvpair

Don't build libctf or libnvpair

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
cddl/usr.bin/Makefile: Not yet - {ctfconvert, ctfdump, ctfmerge}

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl: Splice out some capsicum from file.h API & fix a header

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/compat: Fix opensolaris_vm.c locking

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/compat: fix include in vnode.h

'sys/sys/syscallsubr.h' is called 'sys/kern_syscall.h' in Dfly.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
cmd/zfs/zfs_main.c: fix jail.h include

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/contrib/*/arc.c: Fix missing includes

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cpu/x86_64: Missing atomic_{add,subtract}_64 in atomic.h

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
cddl/compat/opensolaris/sys/sig.h: Convert mtx_ to lwkt_ locking

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>