Add more __BEGIN_DECLS / __END_DECLS to <sys/capability.h>.
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
This commit is contained in:
parent
ec0ad11ed2
commit
53905cf487
@ -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 <sys/systm.h>
|
||||
|
Loading…
Reference in New Issue
Block a user