Reapply r326600 (by imp):

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:
Dimitry Andric 2020-08-02 18:30:29 +00:00
parent fd28fec2f0
commit dd6565b7a6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/clang1100-import/; revision=363778

View File

@ -72,12 +72,16 @@
#error Unsupported target
#endif
#if defined(__NetBSD__) && (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