Date: Thu, 16 Jan 2025 18:08:06 GMT From: Olivier Certner <olce@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: b1fe5eac37ba - stable/14 - MAC: mac.h: Fix missing includes/typedefs Message-ID: <202501161808.50GI86PJ091308@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=b1fe5eac37bab5bb2606bb4e0b1eee4877b3b367 commit b1fe5eac37bab5bb2606bb4e0b1eee4877b3b367 Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2024-07-29 14:21:52 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2025-01-16 18:06:53 +0000 MAC: mac.h: Fix missing includes/typedefs This fixes inclusion from userspace, and also kernel inclusion for source files not including explicitly nor implicitly <sys/types.h>. Reviewed by: jamie Approved by: markj (mentor) MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46896 (cherry picked from commit 5140ccf2268b0e771c89e46f46c60e1fee7637c3) --- sys/sys/mac.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/sys/mac.h b/sys/sys/mac.h index facdc14c332d..ae8d8d38f17b 100644 --- a/sys/sys/mac.h +++ b/sys/sys/mac.h @@ -47,6 +47,13 @@ #ifndef _SYS_MAC_H_ #define _SYS_MAC_H_ +#include <sys/_types.h> + +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif + #ifndef _POSIX_MAC #define _POSIX_MAC #endif @@ -72,6 +79,13 @@ typedef struct mac *mac_t; #ifndef _KERNEL +#include <sys/cdefs.h> /* For __BEGIN_DECLS and __END_DECLS. */ + +#ifndef _PID_T_DECLARED +typedef __pid_t pid_t; /* process id */ +#define _PID_T_DECLARED +#endif + /* * Location of the userland MAC framework configuration file. mac.conf * set defaults for MAC-aware applications.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501161808.50GI86PJ091308>