From e645c6addb0abbd5674554567104e07bab358eea Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Sun, 18 Sep 2016 19:16:48 +0000 Subject: [PATCH] Simplify the fix for bootstrap tools building head is not supported from prior to stable/10 where sys/capsicum.h was named sys/capabilities.h Reported by: kib --- usr.bin/soelim/soelim.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/usr.bin/soelim/soelim.c b/usr.bin/soelim/soelim.c index 787e42033126..e9e2f3cddf20 100644 --- a/usr.bin/soelim/soelim.c +++ b/usr.bin/soelim/soelim.c @@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$"); #include #if __FreeBSD_version > 1001510 #include +#else +#include #endif #include @@ -163,10 +165,8 @@ main(int argc, char **argv) int ret = 0; int flags = 0; char cwd[MAXPATHLEN]; -#if __FreeBSD_version > 1001510 unsigned long cmd; cap_rights_t rights; -#endif includes = sl_init(); if (getcwd(cwd, sizeof(cwd)) != NULL) @@ -200,7 +200,6 @@ main(int argc, char **argv) rootfd = open("/", O_DIRECTORY | O_RDONLY); if (rootfd == -1) err(EXIT_FAILURE, "unable to open '/'"); -#if __FreeBSD_version > 1001510 cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_IOCTL); /* * EBADF in case stdin is closed by the caller @@ -227,7 +226,6 @@ main(int argc, char **argv) if (cap_enter() < 0 && errno != ENOSYS) err(EXIT_FAILURE, "unable to enter capability mode"); -#endif if (argc == 0) ret = soelim_file(rootfd, stdin, flags);