From 6b66d5bb4b1555d8530573dd95f0aa25d59cd56e Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Thu, 2 Oct 2003 03:07:51 +0000 Subject: [PATCH] Use __BEGIN_DECLS and __END_DECLS around userland function prototypes so that mac.h may be more safely included in userland C++ applications. PR: bin/56595 Submitted by: "KONDOU, Kazuhiro" --- sys/security/mac/mac_framework.h | 2 ++ sys/sys/mac.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h index a50d269880f..7955c25aa61 100644 --- a/sys/security/mac/mac_framework.h +++ b/sys/security/mac/mac_framework.h @@ -76,6 +76,7 @@ typedef struct mac *mac_t; * Extended non-POSIX.1e interfaces that offer additional services * available from the userland and kernel MAC frameworks. */ +__BEGIN_DECLS int mac_execve(char *fname, char **argv, char **envv, mac_t _label); int mac_free(mac_t _label); int mac_from_text(mac_t *_label, const char *_text); @@ -96,6 +97,7 @@ int mac_set_link(const char *_path, mac_t _label); int mac_set_proc(const mac_t _label); int mac_syscall(const char *_policyname, int _call, void *_arg); int mac_to_text(mac_t mac, char **_text); +__END_DECLS #else /* _KERNEL */ diff --git a/sys/sys/mac.h b/sys/sys/mac.h index a50d269880f..7955c25aa61 100644 --- a/sys/sys/mac.h +++ b/sys/sys/mac.h @@ -76,6 +76,7 @@ typedef struct mac *mac_t; * Extended non-POSIX.1e interfaces that offer additional services * available from the userland and kernel MAC frameworks. */ +__BEGIN_DECLS int mac_execve(char *fname, char **argv, char **envv, mac_t _label); int mac_free(mac_t _label); int mac_from_text(mac_t *_label, const char *_text); @@ -96,6 +97,7 @@ int mac_set_link(const char *_path, mac_t _label); int mac_set_proc(const mac_t _label); int mac_syscall(const char *_policyname, int _call, void *_arg); int mac_to_text(mac_t mac, char **_text); +__END_DECLS #else /* _KERNEL */