aboutsummaryrefslogtreecommitdiff
path: root/cddl/lib/libnvpair/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'cddl/lib/libnvpair/Makefile')
-rw-r--r--cddl/lib/libnvpair/Makefile44
1 files changed, 19 insertions, 25 deletions
diff --git a/cddl/lib/libnvpair/Makefile b/cddl/lib/libnvpair/Makefile
index 90c3295d5048..670253eff7c1 100644
--- a/cddl/lib/libnvpair/Makefile
+++ b/cddl/lib/libnvpair/Makefile
@@ -1,36 +1,30 @@
# $FreeBSD$
-.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
-.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/nvpair
+.PATH: ${SRCTOP}/sys/contrib/openzfs/module/nvpair
+.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libnvpair
LIB= nvpair
PACKAGE= runtime
-INCS= libnvpair.h
+# user
SRCS= libnvpair.c \
- nvpair_alloc_system.c \
- nvpair_json.c \
- opensolaris_fnvpair.c \
- opensolaris_nvpair.c \
- opensolaris_nvpair_alloc_fixed.c
+ libnvpair_json.c \
+ nvpair_alloc_system.c
+# kernel
+SRCS+= nvpair_alloc_fixed.c \
+ nvpair.c \
+ fnvpair.c
-WARNS?= 1
-CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
-CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
-CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+WARNS?= 2
+CFLAGS+= -DIN_BASE -DHAVE_RPC_TYPES
+CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include
+CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/
+CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd
CFLAGS+= -I${SRCTOP}/sys
-CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
-CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h
+CFLAGS+= -DHAVE_ISSETUGID -DHAVE_CONFIG_H -DHAVE_XDR_BYTESREC
+
-# This library uses macros to define fprintf behavior for several object types
-# The compiler will see the non-string literal arguments to the fprintf calls and
-# omit warnings for them. Quiesce these warnings in contrib code:
-#
-# cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:743:12: warning: format
-# string is not a string literal (potentially insecure) [-Wformat-security]
-# ARENDER(pctl, nvlist_array, nvl, name, val, nelem);
-#
-CFLAGS+= -Wno-format-security
+CFLAGS.nvpair.c+= -UHAVE_RPC_TYPES
.include <bsd.lib.mk>