Date: Fri, 17 Jan 2025 12:27:00 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: c05d82c461e7 - stable/13 - MAC: mac.h: Fix missing includes/typedefs Message-ID: <202501171227.50HCR0HX051882@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=c05d82c461e7314823698a59f3781e0f6b7ab7b0 commit c05d82c461e7314823698a59f3781e0f6b7ab7b0 Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2024-07-29 14:21:52 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2025-01-17 12:24:49 +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?202501171227.50HCR0HX051882>