Since this is contrib code, create an upstreamable version of my

change. Now on FreeBSD and NetBSD if _STANDALONE is defined, we
include the kernel version with alloances for the quirky differences
between the two.

Sponsored by: Netflix
This commit is contained in:
Warner Losh 2017-12-05 22:24:20 +00:00
parent e1734edf76
commit c87d5a5826
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326600

View File

@ -55,12 +55,16 @@
#define UNUSED __attribute__((unused))
#endif
#if (defined(_KERNEL) || defined(_STANDALONE))
#if (defined(__FreeBSD__) || defined(__NetBSD__)) && (defined(_KERNEL) || defined(_STANDALONE))
/*
* Kernel and boot environment can't use normal headers,
* so use the equivalent system headers.
*/
#ifdef __FreeBSD__
# include <sys/limits.h>
#else
# include <machine/limits.h>
#endif
# include <sys/stdint.h>
# include <sys/types.h>
#else