aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libselinux/0001-libselinux-allow-link-with-lfts.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/libselinux/0001-libselinux-allow-link-with-lfts.patch')
-rw-r--r--testing/libselinux/0001-libselinux-allow-link-with-lfts.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/testing/libselinux/0001-libselinux-allow-link-with-lfts.patch b/testing/libselinux/0001-libselinux-allow-link-with-lfts.patch
new file mode 100644
index 0000000000..744bc4222a
--- /dev/null
+++ b/testing/libselinux/0001-libselinux-allow-link-with-lfts.patch
@@ -0,0 +1,40 @@
+From 79e346397327277ab793868e2f9d4a29525b6bf3 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 21 Feb 2017 19:50:18 +0100
+Subject: [PATCH] libselinux: allow link with -lfts
+
+This makes it possible to build libselinux with the external libtfs for
+systems which does not implement the non-standard fts. For example musl
+libc.
+
+ make FTS_LDFLAGS=-lfts
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ libselinux/src/Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
+index 5640a57..513a9e7 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -92,6 +92,7 @@ LD_SONAME_FLAGS=-install_name,$(LIBSO)
+ endif
+
+ PCRE_LDFLAGS ?= -lpcre
++FTS_LDFLAGS ?=
+
+ override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
+
+@@ -143,7 +144,7 @@ $(LIBA): $(OBJS)
+ $(RANLIB) $@
+
+ $(LIBSO): $(LOBJS)
+- $(CC) $(CFLAGS) -shared -o $@ $^ $(PCRE_LDFLAGS) -ldl $(LDFLAGS) -L$(LIBDIR) -Wl,$(LD_SONAME_FLAGS)
++ $(CC) $(CFLAGS) -shared -o $@ $^ $(PCRE_LDFLAGS) $(FTS_LDFLAGS) -ldl $(LDFLAGS) -L$(LIBDIR) -Wl,$(LD_SONAME_FLAGS)
+ ln -sf $@ $(TARGET)
+
+ $(LIBPC): $(LIBPC).in ../VERSION
+--
+2.11.1
+