aboutsummaryrefslogtreecommitdiff
path: root/cddl
diff options
context:
space:
mode:
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh2
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d12
-rw-r--r--cddl/contrib/opensolaris/cmd/lockstat/lockstat.c4
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/mips/dt_isadep.c75
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/common/memory.c14
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/common/memory.h1
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c7
-rw-r--r--cddl/lib/Makefile49
-rw-r--r--cddl/lib/libdtrace/Makefile4
-rw-r--r--cddl/lib/libicp/Makefile29
-rw-r--r--cddl/lib/libicp_rescue/Makefile29
-rw-r--r--cddl/lib/libnvpair/Makefile2
-rw-r--r--cddl/lib/libzpool/Makefile2
-rw-r--r--cddl/sbin/Makefile9
-rw-r--r--cddl/share/Makefile6
-rw-r--r--cddl/usr.bin/Makefile16
-rw-r--r--cddl/usr.bin/zstream/Makefile1
-rw-r--r--cddl/usr.libexec/Makefile7
-rw-r--r--cddl/usr.sbin/Makefile25
-rw-r--r--cddl/usr.sbin/zfsd/Makefile.common2
20 files changed, 131 insertions, 165 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh
index 59094e3da37f..1c23b2a0b9e0 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh
@@ -61,7 +61,7 @@ EOF
sleeper()
{
while true; do
- $longsleep &
+ limits -c unlimited $longsleep &
/bin/sleep 1
kill -SEGV $!
done
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d
index cd4715319913..c6bfff2181e6 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d
@@ -37,23 +37,23 @@
#pragma D option quiet
-struct input_struct {
+struct dtrace_input_struct {
int ii;
char ic;
};
-struct output_struct {
+struct dtrace_output_struct {
int oi;
char oc;
};
-typedef struct output_struct output_t;
+typedef struct dtrace_output_struct dtrace_output_t;
-translator output_t < struct input_struct *ivar >
+translator dtrace_output_t < struct dtrace_input_struct *ivar >
{
- oi = ((struct input_struct *) ivar)->ii;
- oc = ((struct input_struct *) ivar)->ic;
+ oi = ((struct dtrace_input_struct *) ivar)->ii;
+ oc = ((struct dtrace_input_struct *) ivar)->ic;
};
BEGIN
diff --git a/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c b/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c
index a7378980bc56..2fd29843b8ce 100644
--- a/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c
+++ b/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c
@@ -606,14 +606,14 @@ predicate_add(char **pred, char *what, char *cmp, uintptr_t value)
if (*pred[0] != '\0') {
if (cmp != NULL) {
- (void) sprintf(new, "(%s) && (%s %s 0x%p)",
+ (void) sprintf(new, "(%s) && (%s %s %p)",
*pred, what, cmp, (void *)value);
} else {
(void) sprintf(new, "(%s) && (%s)", *pred, what);
}
} else {
if (cmp != NULL) {
- (void) sprintf(new, "%s %s 0x%p",
+ (void) sprintf(new, "%s %s %p",
what, cmp, (void *)value);
} else {
(void) sprintf(new, "%s", what);
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/mips/dt_isadep.c b/cddl/contrib/opensolaris/lib/libdtrace/mips/dt_isadep.c
deleted file mode 100644
index 1aeb95f3dfd7..000000000000
--- a/cddl/contrib/opensolaris/lib/libdtrace/mips/dt_isadep.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <stdlib.h>
-#include <assert.h>
-#include <errno.h>
-#include <string.h>
-#include <libgen.h>
-
-#include <dt_impl.h>
-#include <dt_pid.h>
-
-/*ARGSUSED*/
-int
-dt_pid_create_entry_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp,
- fasttrap_probe_spec_t *ftp, const GElf_Sym *symp)
-{
-
- dt_dprintf("%s: unimplemented\n", __func__);
- return (DT_PROC_ERR);
-}
-
-int
-dt_pid_create_return_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp,
- fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, uint64_t *stret)
-{
-
- dt_dprintf("%s: unimplemented\n", __func__);
- return (DT_PROC_ERR);
-}
-
-/*ARGSUSED*/
-int
-dt_pid_create_offset_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp,
- fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, ulong_t off)
-{
-
- dt_dprintf("%s: unimplemented\n", __func__);
- return (DT_PROC_ERR);
-}
-
-/*ARGSUSED*/
-int
-dt_pid_create_glob_offset_probes(struct ps_prochandle *P, dtrace_hdl_t *dtp,
- fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, const char *pattern)
-{
-
- dt_dprintf("%s: unimplemented\n", __func__);
- return (DT_PROC_ERR);
-}
diff --git a/cddl/contrib/opensolaris/tools/ctf/common/memory.c b/cddl/contrib/opensolaris/tools/ctf/common/memory.c
index e16044a8b672..66296c5b114d 100644
--- a/cddl/contrib/opensolaris/tools/ctf/common/memory.c
+++ b/cddl/contrib/opensolaris/tools/ctf/common/memory.c
@@ -44,6 +44,20 @@ memory_bailout(void)
exit(1);
}
+int
+xasprintf(char **s, const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ va_start(ap, fmt);
+ ret = vasprintf(s, fmt, ap);
+ va_end(ap);
+ if (ret == -1)
+ memory_bailout();
+ return (ret);
+}
+
void *
xmalloc(size_t size)
{
diff --git a/cddl/contrib/opensolaris/tools/ctf/common/memory.h b/cddl/contrib/opensolaris/tools/ctf/common/memory.h
index 88ca31bec65a..72706b5f7fdb 100644
--- a/cddl/contrib/opensolaris/tools/ctf/common/memory.h
+++ b/cddl/contrib/opensolaris/tools/ctf/common/memory.h
@@ -39,6 +39,7 @@
extern "C" {
#endif
+int xasprintf(char **, const char *, ...);
void *xmalloc(size_t);
void *xcalloc(size_t);
char *xstrdup(const char *);
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
index 2d686e53fed1..67866555ae5d 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
@@ -618,7 +618,7 @@ tdesc_intr_long(dwarf_t *dw)
* caller can then use the copy as the type for a bitfield structure member.
*/
static tdesc_t *
-tdesc_intr_clone(dwarf_t *dw, tdesc_t *old, size_t bitsz)
+tdesc_intr_clone(dwarf_t *dw, tdesc_t *old, size_t bitsz, const char *suffix)
{
tdesc_t *new = xcalloc(sizeof (tdesc_t));
@@ -627,7 +627,7 @@ tdesc_intr_clone(dwarf_t *dw, tdesc_t *old, size_t bitsz)
"unresolved type\n", old->t_id);
}
- new->t_name = xstrdup(old->t_name);
+ xasprintf(&new->t_name, "%s %s", old->t_name, suffix);
new->t_size = old->t_size;
new->t_id = mfgtid_next(dw);
new->t_type = INTRINSIC;
@@ -1158,7 +1158,8 @@ die_sou_resolve(tdesc_t *tdp, tdesc_t **tdpp __unused, void *private)
debug(3, "tdp %u: creating bitfield for %d bits\n",
tdp->t_id, ml->ml_size);
- ml->ml_type = tdesc_intr_clone(dw, mt, ml->ml_size);
+ ml->ml_type = tdesc_intr_clone(dw, mt, ml->ml_size,
+ "bitfield");
}
}
diff --git a/cddl/lib/Makefile b/cddl/lib/Makefile
index 5ca0d56b291a..e66109a21138 100644
--- a/cddl/lib/Makefile
+++ b/cddl/lib/Makefile
@@ -2,39 +2,32 @@
.include <src.opts.mk>
-SUBDIR= drti \
- libavl \
+.if ${MK_DTRACE} == yes || ${MK_ZFS} == yes
+SUBDIR= libspl
+.endif
+
+SUBDIR.${MK_DTRACE}+= \
+ drti \
libctf \
- libdtrace \
- ${_libicp} \
- ${_libicp_rescue} \
+ libdtrace
+
+SUBDIR.${MK_TESTS}+= tests
+
+SUBDIR.${MK_ZFS}+= \
+ libavl \
+ libicp \
+ libicp_rescue \
libnvpair \
- libspl \
- ${_libtpool} \
+ libtpool \
libumem \
libuutil \
- ${_libzfs_core} \
- ${_libzfs} \
- ${_libzfsbootenv} \
- ${_libzpool} \
- ${_libzutil} \
- ${_pam_zfs_key}
-
-SUBDIR.${MK_TESTS}+= tests
+ libzfs \
+ libzfs_core \
+ libzfsbootenv \
+ libzpool \
+ libzutil
-.if ${MK_ZFS} != "no"
-_libzfs_core= libzfs_core
-_libicp= libicp
-_libicp_rescue= libicp_rescue
-_libzfs= libzfs
-_libzutil= libzutil
-_libzfsbootenv= libzfsbootenv
-_libzpool= libzpool
-_libtpool= libtpool
-.if ${MK_OPENSSL} != "no"
-_pam_zfs_key= pam_zfs_key
-.endif
-.endif
+SUBDIR.${MK_ZFS}.${MK_OPENSSL} = pam_zfs_key
SUBDIR_DEPEND_libavl= libspl
SUBDIR_DEPEND_libctf= libspl
diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile
index 05b183215f4c..f95517f10ebb 100644
--- a/cddl/lib/libdtrace/Makefile
+++ b/cddl/lib/libdtrace/Makefile
@@ -107,10 +107,6 @@ CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel -DDIS_MEM
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/arm
.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/arm
.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/arm
-.elif ${MACHINE_CPUARCH} == "mips"
-CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/mips
-.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/mips
-.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/mips
.elif ${MACHINE_CPUARCH} == "powerpc"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/powerpc
.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/powerpc
diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile
index 6a8e979ea836..58ebb292c946 100644
--- a/cddl/lib/libicp/Makefile
+++ b/cddl/lib/libicp/Makefile
@@ -16,9 +16,23 @@ ASM_SOURCES_AS = \
asm-x86_64/modes/aesni-gcm-x86_64.S \
asm-x86_64/modes/ghash-x86_64.S \
asm-x86_64/sha2/sha256_impl.S \
- asm-x86_64/sha2/sha512_impl.S
+ asm-x86_64/sha2/sha512_impl.S \
+ asm-x86_64/blake3/blake3_avx2.S \
+ asm-x86_64/blake3/blake3_avx512.S \
+ asm-x86_64/blake3/blake3_sse2.S \
+ asm-x86_64/blake3/blake3_sse41.S
CFLAGS+= -D__amd64 -D_SYS_STACK_H -UHAVE_AES
+.elif ${MACHINE_ARCH} == "aarch64"
+ASM_SOURCES_C =
+ASM_SOURCES_AS = \
+ asm-aarch64/blake3/b3_aarch64_sse2.S \
+ asm-aarch64/blake3/b3_aarch64_sse41.S
+.elif ${MACHINE_ARCH} == "powerpc64le"
+ASM_SOURCES_C =
+ASM_SOURCES_AS = \
+ asm-ppc64/blake3/b3_ppc64le_sse2.S \
+ asm-ppc64/blake3/b3_ppc64le_sse41.S
.else
ASM_SOURCES_C =
ASM_SOURCES_AS =
@@ -35,6 +49,10 @@ KERNEL_C = \
algs/aes/aes_impl_x86-64.c \
algs/aes/aes_impl.c \
algs/aes/aes_modes.c \
+ algs/blake3/blake3.c \
+ algs/blake3/blake3_generic.c \
+ algs/blake3/blake3_impl.c \
+ algs/blake3/blake3_x86-64.c \
algs/edonr/edonr.c \
algs/modes/modes.c \
algs/modes/cbc.c \
@@ -88,5 +106,14 @@ CFLAGS.aesni-gcm-x86_64.S+= -DLOCORE
CFLAGS.ghash-x86_64.S+= -DLOCORE
CFLAGS.sha256_impl.S+= -DLOCORE
CFLAGS.sha512_impl.S+= -DLOCORE
+CFLAGS.blake3_avx2.S = -DLOCORE
+CFLAGS.blake3_avx512.S = -DLOCORE
+CFLAGS.blake3_sse2.S = -DLOCORE
+CFLAGS.blake3_sse41.S = -DLOCORE
+CFLAGS.b3_aarch64_sse2.S = -DLOCORE
+CFLAGS.b3_aarch64_sse41.S = -DLOCORE
+CFLAGS.b3_ppc64le_sse2.S = -DLOCORE
+CFLAGS.b3_ppc64le_sse41.S = -DLOCORE
+
.include <bsd.lib.mk>
diff --git a/cddl/lib/libicp_rescue/Makefile b/cddl/lib/libicp_rescue/Makefile
index d3e69d276d17..1237b1b05edf 100644
--- a/cddl/lib/libicp_rescue/Makefile
+++ b/cddl/lib/libicp_rescue/Makefile
@@ -15,9 +15,23 @@ ASM_SOURCES_AS = \
asm-x86_64/modes/gcm_pclmulqdq.S \
asm-x86_64/modes/aesni-gcm-x86_64.S \
asm-x86_64/sha2/sha256_impl.S \
- asm-x86_64/sha2/sha512_impl.S
+ asm-x86_64/sha2/sha512_impl.S \
+ asm-x86_64/blake3/blake3_avx2.S \
+ asm-x86_64/blake3/blake3_avx512.S \
+ asm-x86_64/blake3/blake3_sse2.S \
+ asm-x86_64/blake3/blake3_sse41.S
CFLAGS+= -D__amd64 -D_SYS_STACK_H
+.elif ${MACHINE_ARCH} == "aarch64"
+ASM_SOURCES_C =
+ASM_SOURCES_AS = \
+ asm-aarch64/blake3/b3_aarch64_sse2.S \
+ asm-aarch64/blake3/b3_aarch64_sse41.S
+.elif ${MACHINE_ARCH} == "powerpc64le"
+ASM_SOURCES_C =
+ASM_SOURCES_AS = \
+ asm-ppc64/blake3/b3_ppc64le_sse2.S \
+ asm-ppc64/blake3/b3_ppc64le_sse41.S
.else
ASM_SOURCES_C =
ASM_SOURCES_AS =
@@ -34,6 +48,10 @@ KERNEL_C = \
algs/aes/aes_impl_x86-64.c \
algs/aes/aes_impl.c \
algs/aes/aes_modes.c \
+ algs/blake3/blake3.c \
+ algs/blake3/blake3_generic.c \
+ algs/blake3/blake3_impl.c \
+ algs/blake3/blake3_x86-64.c \
algs/edonr/edonr.c \
algs/modes/modes.c \
algs/modes/cbc.c \
@@ -81,5 +99,14 @@ CFLAGS.ghash-x86_64.S+= -DLOCORE
CFLAGS.sha256_impl.S+= -DLOCORE
CFLAGS.sha512_impl.S+= -DLOCORE
CFLAGS.gcm.c+= -UCAN_USE_GCM_ASM
+CFLAGS.blake3_avx2.S = -DLOCORE
+CFLAGS.blake3_avx512.S = -DLOCORE
+CFLAGS.blake3_sse2.S = -DLOCORE
+CFLAGS.blake3_sse41.S = -DLOCORE
+CFLAGS.b3_aarch64_sse2.S = -DLOCORE
+CFLAGS.b3_aarch64_sse41.S = -DLOCORE
+CFLAGS.b3_ppc64le_sse2.S = -DLOCORE
+CFLAGS.b3_ppc64le_sse41.S = -DLOCORE
+
.include <bsd.lib.mk>
diff --git a/cddl/lib/libnvpair/Makefile b/cddl/lib/libnvpair/Makefile
index aaf76ed3fb28..d436b9b1df27 100644
--- a/cddl/lib/libnvpair/Makefile
+++ b/cddl/lib/libnvpair/Makefile
@@ -2,12 +2,14 @@
.PATH: ${SRCTOP}/sys/contrib/openzfs/module/nvpair
.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libnvpair
+.PATH: ${SRCTOP}/sys/contrib/openzfs/include
LIB= nvpair
LIBADD= spl
PACKAGE= runtime
# user
+INCS= libnvpair.h
SRCS= libnvpair.c \
libnvpair_json.c \
nvpair_alloc_system.c
diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile
index 69700ec51407..92f1bda6d82a 100644
--- a/cddl/lib/libzpool/Makefile
+++ b/cddl/lib/libzpool/Makefile
@@ -56,6 +56,7 @@ KERNEL_C = \
aggsum.c \
arc.c \
arc_os.c \
+ blake3_zfs.c \
blkptr.c \
bplist.c \
bpobj.c \
@@ -169,6 +170,7 @@ KERNEL_C = \
zcp_synctask.c \
zfeature.c \
zfs_byteswap.c \
+ zfs_chksum.c \
zfs_debug.c \
zfs_fm.c \
zfs_fuid.c \
diff --git a/cddl/sbin/Makefile b/cddl/sbin/Makefile
index 99c4a91a3e69..2b3dcf886246 100644
--- a/cddl/sbin/Makefile
+++ b/cddl/sbin/Makefile
@@ -2,14 +2,11 @@
.include <src.opts.mk>
-SUBDIR= ${_zfs} ${_zpool}
-
SUBDIR.${MK_TESTS}+= tests
-.if ${MK_ZFS} != "no"
-_zfs= zfs
-_zpool= zpool
-.endif
+SUBDIR.${MK_ZFS}+= \
+ zfs \
+ zpool
SUBDIR_PARALLEL=
diff --git a/cddl/share/Makefile b/cddl/share/Makefile
index 68670ffbe7e0..258b60877f75 100644
--- a/cddl/share/Makefile
+++ b/cddl/share/Makefile
@@ -2,11 +2,7 @@
.include <src.opts.mk>
-SUBDIR= ${_zfs}
-
-.if ${MK_ZFS} != "no"
-_zfs= zfs
-.endif
+SUBDIR.${MK_ZFS}+= zfs
SUBDIR_PARALLEL=
diff --git a/cddl/usr.bin/Makefile b/cddl/usr.bin/Makefile
index 10d55215c0b3..97c4639cece0 100644
--- a/cddl/usr.bin/Makefile
+++ b/cddl/usr.bin/Makefile
@@ -2,21 +2,17 @@
.include <src.opts.mk>
-SUBDIR= \
+SUBDIR.${MK_DTRACE}+= \
ctfconvert \
ctfdump \
- ctfmerge \
- ${_zinject} \
- ${_zstream} \
- ${_ztest}
+ ctfmerge
SUBDIR.${MK_TESTS}+= tests
-.if ${MK_ZFS} != "no"
-_zinject= zinject
-_ztest= ztest
-_zstream = zstream
-.endif
+SUBDIR.${MK_ZFS}+= \
+ zinject \
+ ztest \
+ zstream
SUBDIR_PARALLEL=
diff --git a/cddl/usr.bin/zstream/Makefile b/cddl/usr.bin/zstream/Makefile
index cfcff71a813f..6296390592b3 100644
--- a/cddl/usr.bin/zstream/Makefile
+++ b/cddl/usr.bin/zstream/Makefile
@@ -11,6 +11,7 @@ MLINKS= zstream.8 zstreamdump.8
INCS= zstream.h
SRCS= \
zstream.c \
+ zstream_decompress.c \
zstream_dump.c \
zstream_redup.c \
zstream_token.c
diff --git a/cddl/usr.libexec/Makefile b/cddl/usr.libexec/Makefile
index 6280cbab5766..7b7dfc7bd354 100644
--- a/cddl/usr.libexec/Makefile
+++ b/cddl/usr.libexec/Makefile
@@ -2,11 +2,8 @@
.include <src.opts.mk>
-SUBDIR= ${_zpool_influxdb}
-
-.if ${MK_ZFS} != "no"
-_zpool_influxdb= zpool_influxdb
-.endif
+SUBDIR.${MK_ZFS}+= \
+ zpool_influxdb
SUBDIR_PARALLEL=
diff --git a/cddl/usr.sbin/Makefile b/cddl/usr.sbin/Makefile
index 42de5c96c53a..68dc735b3d1b 100644
--- a/cddl/usr.sbin/Makefile
+++ b/cddl/usr.sbin/Makefile
@@ -2,23 +2,19 @@
.include <src.opts.mk>
-SUBDIR= ${_dtrace} \
+SUBDIR.${MK_DTRACE}+= \
+ ${_dtrace} \
${_dwatch} \
${_lockstat} \
- ${_plockstat} \
- ${_zdb} \
- ${_zfsd} \
- ${_zhack}
+ ${_plockstat}
SUBDIR.${MK_TESTS}+= tests
-.if ${MK_ZFS} != "no"
-_zdb= zdb
-_zhack= zhack
-. if ${MK_CXX} != "no"
-_zfsd= zfsd
-. endif
-.endif
+SUBDIR.${MK_ZFS}+= \
+ zdb \
+ zhack
+SUBDIR.${MK_ZFS}.${MK_CXX}+= \
+ zfsd
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
_dtrace= dtrace
@@ -34,11 +30,6 @@ _dwatch= dwatch
_lockstat= lockstat
.endif
-.if ${MACHINE_CPUARCH} == "mips"
-_dtrace= dtrace
-_dwatch= dwatch
-.endif
-
.if ${MACHINE_CPUARCH} == "powerpc"
_dtrace= dtrace
_dwatch= dwatch
diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common
index 5e9257d7b37e..68d921c90e37 100644
--- a/cddl/usr.sbin/zfsd/Makefile.common
+++ b/cddl/usr.sbin/zfsd/Makefile.common
@@ -24,7 +24,7 @@ CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccomp
CFLAGS+= -I${SRCTOP}/cddl/usr.sbin
# use issetugid(2)
-CFLAGS+= -D_MACHINE_FLOAT_H_ -DHAVE_ISSETUGID
+CFLAGS+= -DHAVE_ISSETUGID
LIBADD+= devdctl zfs util geom bsdxml sbuf nvpair avl uutil zutil