Don't rely on sys/_types.h including sys/cdefs.h

These headers relied in __BEGIN_DECS/__END_DECLS being defined when
sys/_types.h was included, but there's not a requirement that this be
the case.

Reviewed by:	imp
Exp-run by:	antoine (PR 286274)
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1595
This commit is contained in:
Brooks Davis 2025-06-11 17:39:01 +01:00
parent 8ac82ba19e
commit b01e971fd3
4 changed files with 5 additions and 0 deletions

View file

@ -32,6 +32,8 @@
#ifndef _EXECINFO_H_
#define _EXECINFO_H_
#include <sys/cdefs.h>
#include <stddef.h>
__BEGIN_DECLS

View file

@ -32,6 +32,7 @@
#ifndef _DLFCN_H_
#define _DLFCN_H_
#include <sys/cdefs.h>
#include <sys/_types.h>
/*

View file

@ -15,6 +15,7 @@
#ifndef _MATH_H_
#define _MATH_H_
#include <sys/cdefs.h>
#include <sys/_types.h>
#include <machine/_limits.h>

View file

@ -108,6 +108,7 @@ int procdesc_falloc(struct thread *, struct file **, int *, int,
#else /* !_KERNEL */
#include <sys/cdefs.h>
#include <sys/_types.h>
#ifndef _PID_T_DECLARED