[PATCH] libselinux: utils: link with shared libfts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Linux with musl libc, libfts isn't shipped with libc.
Hence, we link with $(FTS_LIBS) in src.

Some (most) musl-based distribution choose to ship libfts as
a standalone shared object because their libfts is licensed under either
very permissive license or that implementation of libfts requires
attribution in every usage.

Always link with $(FTS_LIBS) in utils to prevent undefined reference
problem on those platforms.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@xxxxxxxxx>
---
 libselinux/utils/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libselinux/utils/Makefile b/libselinux/utils/Makefile
index aa2d3e1b..1a7da223 100644
--- a/libselinux/utils/Makefile
+++ b/libselinux/utils/Makefile
@@ -45,6 +45,8 @@ override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
 override LDFLAGS += -L../src
 override LDLIBS += -lselinux $(FTS_LDLIBS)
 PCRE_LDLIBS ?= -lpcre
+FTS_LDLIBS ?=
+override LDLIBS += $(FTS_LDLIBS)
 
 ifeq ($(ANDROID_HOST),y)
 TARGETS=sefcontext_compile
-- 
2.26.2.672.g232c24e857




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux