From 53905cf487cda4c485ac9ad14ffb96115af0e22b Mon Sep 17 00:00:00 2001 From: Jonathan Anderson Date: Tue, 18 Feb 2014 14:54:56 +0000 Subject: [PATCH] Add more __BEGIN_DECLS / __END_DECLS to . capability.h currently only wraps some of its declarations in __BEGIN_DECLS/__END_DECLS, so cap_enter(), cap_sandboxed(), etc. are usable from C++ code but cap_rights_init(), cap_rights_is_valid() etc. are not. This commit fixes this distinction. Approved by: rwatson (mentor) MFC after: 1 week Sponsored by: DARPA, AFRL --- sys/sys/capability.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/sys/capability.h b/sys/sys/capability.h index aad4a15314b..ea25b8b8201 100644 --- a/sys/sys/capability.h +++ b/sys/sys/capability.h @@ -315,6 +315,8 @@ #define CAP_IOCTLS_ALL SSIZE_MAX +__BEGIN_DECLS + #define cap_rights_init(...) \ __cap_rights_init(CAP_RIGHTS_VERSION, __VA_ARGS__, 0ULL) cap_rights_t *__cap_rights_init(int version, cap_rights_t *rights, ...); @@ -336,6 +338,8 @@ cap_rights_t *cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); cap_rights_t *cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little); +__END_DECLS + #ifdef _KERNEL #include