Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Sep 2016 19:16:49 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r305949 - head/usr.bin/soelim
Message-ID:  <201609181916.u8IJGnG2062423@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sun Sep 18 19:16:48 2016
New Revision: 305949
URL: https://svnweb.freebsd.org/changeset/base/305949

Log:
  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

Modified:
  head/usr.bin/soelim/soelim.c

Modified: head/usr.bin/soelim/soelim.c
==============================================================================
--- head/usr.bin/soelim/soelim.c	Sun Sep 18 18:49:18 2016	(r305948)
+++ head/usr.bin/soelim/soelim.c	Sun Sep 18 19:16:48 2016	(r305949)
@@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$");
 #include <sys/param.h>
 #if __FreeBSD_version > 1001510
 #include <sys/capsicum.h>
+#else
+#include <sys/capabilities.h>
 #endif
 #include <sys/types.h>
 
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609181916.u8IJGnG2062423>