libbb: compile capability code only if FEATURE_SETPRIV_CAPABILITIES or RUN_INIT

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2018-02-21 20:13:39 +01:00
parent 7d285c78a3
commit 2af5e3fac3
3 changed files with 10 additions and 4 deletions

View File

@ -39,6 +39,12 @@
#include <sys/mount.h>
#if ENABLE_RUN_INIT
# include <sys/prctl.h>
# ifndef PR_CAPBSET_READ
# define PR_CAPBSET_READ 23
# endif
# ifndef PR_CAPBSET_DROP
# define PR_CAPBSET_DROP 24
# endif
# include <linux/capability.h>
// #include <sys/capability.h>
// This header is in libcap, but the functions are in libc.