--- xfsprogs-4.13.1.orig/spaceman/Makefile	2017-09-09 02:35:35.000000000 +0200
+++ xfsprogs-4.13.1/spaceman/Makefile	2017-11-25 17:55:33.271558933 +0100
@@ -9,8 +9,8 @@ LTCOMMAND = xfs_spaceman
 HFILES = init.h space.h
 CFILES = init.c file.c prealloc.c trim.c
 
-LLDLIBS = $(LIBXCMD)
-LTDEPENDENCIES = $(LIBXCMD)
+LLDLIBS = $(LIBXFS) $(LIBXCMD)
+LTDEPENDENCIES = $(LIBXFS) $(LIBXCMD)
 LLDFLAGS = -static
 
 ifeq ($(ENABLE_READLINE),yes)