mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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)
This commit is contained in:
parent
fa940dd2bf
commit
b1fe5eac37
1 changed files with 14 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue