Musl libc does not include the fts(3) functions so need to link to the musl-fts library https://github.com/pullmoll/musl-fts
Signed-off-by: Jason Zaman <ja...@perfinion.com> --- libselinux/src/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile index 8af04aab..977b5c8c 100644 --- a/libselinux/src/Makefile +++ b/libselinux/src/Makefile @@ -98,6 +98,8 @@ LD_SONAME_FLAGS=-install_name,$(LIBSO) endif PCRE_LDLIBS ?= -lpcre +# override with -lfts when building on Musl libc to use fts-standalone +FTS_LDLIBS ?= override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS) @@ -149,7 +151,7 @@ $(LIBA): $(OBJS) $(RANLIB) $@ $(LIBSO): $(LOBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ $(PCRE_LDLIBS) -ldl -Wl,$(LD_SONAME_FLAGS) + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ $(PCRE_LDLIBS) $(FTS_LDLIBS) -ldl -Wl,$(LD_SONAME_FLAGS) ln -sf $@ $(TARGET) $(LIBPC): $(LIBPC).in ../VERSION -- 2.16.1