summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-04-10 10:03:15 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-04-10 13:15:49 -0400
commit9f90d09fcf58269dc09bad90b360d46c374e56e9 (patch)
treea461f3475386bbe34d88e67db1d5bf099245cb88 /config
parent170fd017a1e7d87d0d53502b8f407c9163aa2957 (diff)
downloadbfs-9f90d09fcf58269dc09bad90b360d46c374e56e9.tar.xz
build: Add optional libselinux dependency
Diffstat (limited to 'config')
-rw-r--r--config/libselinux.c6
-rwxr-xr-xconfig/pkgconf.sh3
2 files changed, 9 insertions, 0 deletions
diff --git a/config/libselinux.c b/config/libselinux.c
new file mode 100644
index 0000000..72f5d33
--- /dev/null
+++ b/config/libselinux.c
@@ -0,0 +1,6 @@
+#include <selinux/selinux.h>
+
+int main(void) {
+ freecon(0);
+ return 0;
+}
diff --git a/config/pkgconf.sh b/config/pkgconf.sh
index 070fad6..286c19c 100755
--- a/config/pkgconf.sh
+++ b/config/pkgconf.sh
@@ -37,6 +37,9 @@ else
libcap)
LDLIB=-lcap
;;
+ libselinux)
+ LDLIB=-lselinux
+ ;;
liburing)
LDLIB=-luring
;;