diff --git a/zfs/lib/libspl/Makefile.in b/zfs/lib/libspl/Makefile.in index ebc2cb83eb..d427d54ad7 100644 --- a/zfs/lib/libspl/Makefile.in +++ b/zfs/lib/libspl/Makefile.in @@ -11,6 +11,9 @@ LIBRARY := libspl HOSTCFLAGS += @HOSTCFLAGS@ HOSTCFLAGS += -I@LIBDIR@/libspl/include +HOSTLDFLAGS += -pthread +HOSTLDFLAGS += -lrt + hostprogs-y := zu always := $(hostprogs-y) diff --git a/zfs/lib/libspl/gethrtime.c b/zfs/lib/libspl/gethrtime.c index 466b9cd570..41da8533a0 100644 --- a/zfs/lib/libspl/gethrtime.c +++ b/zfs/lib/libspl/gethrtime.c @@ -26,6 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" +#include #include #include #include @@ -38,7 +39,7 @@ gethrtime(void) rc = clock_gettime(CLOCK_MONOTONIC, &ts); if (rc) { - fprintf(stderr, "Error: clock_gettime() = %d\n", rc) + fprintf(stderr, "Error: clock_gettime() = %d\n", rc); abort(); }