aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/bsdiff/bspatch/bspatch.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2019-07-18 07:26:30 +0000
committerXin LI <delphij@FreeBSD.org>2019-07-18 07:26:30 +0000
commitc93b6e5fa24ba172ab271432c6692f9cc604e15a (patch)
treefda139384cf25b03f771e563a306c4e97949dd68 /usr.bin/bsdiff/bspatch/bspatch.c
parent18cd8a2df868a3a7154172348f8bc61f699e78d4 (diff)
Notes
Diffstat (limited to 'usr.bin/bsdiff/bspatch/bspatch.c')
-rw-r--r--usr.bin/bsdiff/bspatch/bspatch.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.bin/bsdiff/bspatch/bspatch.c b/usr.bin/bsdiff/bspatch/bspatch.c
index 1056eaa8f275..60c4e8244a2a 100644
--- a/usr.bin/bsdiff/bspatch/bspatch.c
+++ b/usr.bin/bsdiff/bspatch/bspatch.c
@@ -29,12 +29,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#if defined(__FreeBSD__)
-#include <sys/param.h>
-#if __FreeBSD_version >= 1001511
+#ifndef WITHOUT_CAPSICUM
#include <sys/capsicum.h>
-#define HAVE_CAPSICUM
-#endif
#endif
#include <bzlib.h>
@@ -107,7 +103,7 @@ int main(int argc, char *argv[])
off_t oldpos, newpos;
off_t ctrl[3];
off_t i, lenread, offset;
-#ifdef HAVE_CAPSICUM
+#ifndef WITHOUT_CAPSICUM
cap_rights_t rights_dir, rights_ro, rights_wr;
#endif
@@ -143,7 +139,7 @@ int main(int argc, char *argv[])
err(1, "open(%s)", argv[2]);
atexit(exit_cleanup);
-#ifdef HAVE_CAPSICUM
+#ifndef WITHOUT_CAPSICUM
if (cap_enter() < 0)
err(1, "failed to enter security sandbox");