aboutsummaryrefslogtreecommitdiff
path: root/src/xz/file_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xz/file_io.c')
-rw-r--r--src/xz/file_io.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/xz/file_io.c b/src/xz/file_io.c
index 55652c53..5a7d317f 100644
--- a/src/xz/file_io.c
+++ b/src/xz/file_io.c
@@ -29,12 +29,8 @@ static bool warn_fchown;
# include <utime.h>
#endif
-#ifdef HAVE_CAPSICUM
-# ifdef HAVE_SYS_CAPSICUM_H
-# include <sys/capsicum.h>
-# else
-# include <sys/capability.h>
-# endif
+#ifdef HAVE_CAP_RIGHTS_LIMIT
+# include <sys/capsicum.h>
#endif
#include "tuklib_open_stdxxx.h"
@@ -214,8 +210,8 @@ io_sandbox_enter(int src_fd)
// characters have been loaded. This is needed at least with glibc.
tuklib_mbstr_width(dummy_str, NULL);
-#ifdef HAVE_CAPSICUM
- // Capsicum needs FreeBSD 10.0 or later.
+#ifdef HAVE_CAP_RIGHTS_LIMIT
+ // Capsicum needs FreeBSD 10.2 or later.
cap_rights_t rights;
if (cap_enter())
@@ -266,7 +262,7 @@ io_sandbox_enter(int src_fd)
return;
error:
-#ifdef HAVE_CAPSICUM
+#ifdef HAVE_CAP_RIGHTS_LIMIT
// If a kernel is configured without capability mode support or
// used in an emulator that does not implement the capability
// system calls, then the Capsicum system calls will fail and set