diff --git a/cmd/zfs/Makefile.am b/cmd/zfs/Makefile.am index 9364598ecd..9edb8c5872 100644 --- a/cmd/zfs/Makefile.am +++ b/cmd/zfs/Makefile.am @@ -24,3 +24,5 @@ zfs_LDADD = \ $(top_builddir)/lib/libuutil/libuutil.la \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la + +zfs_LDFLAGS = -pthread diff --git a/cmd/ztest/Makefile.am b/cmd/ztest/Makefile.am index 14f9dc4315..5972917605 100644 --- a/cmd/ztest/Makefile.am +++ b/cmd/ztest/Makefile.am @@ -6,7 +6,15 @@ DEFAULT_INCLUDES += \ sbin_PROGRAMS = ztest ztest_SOURCES = \ - ztest.c + ${top_srcdir}/cmd/ztest/ztest.c ztest_LDADD = \ - $(top_builddir)/lib/libspl/libspl.la + $(top_builddir)/lib/libspl/libspl.la \ + $(top_builddir)/lib/libavl/libavl.la \ + $(top_builddir)/lib/libnvpair/libnvpair.la \ + $(top_builddir)/lib/libuutil/libuutil.la \ + $(top_builddir)/lib/libzpool/libzpool.la \ + $(top_builddir)/lib/libzfs/libzfs.la + +ztest_LDFLAGS = -pthread +