From dd6565b7a60d228f021190a538caeb652275dc5c Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 2 Aug 2020 18:30:29 +0000 Subject: [PATCH] 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 --- contrib/llvm-project/compiler-rt/lib/builtins/int_lib.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/int_lib.h b/contrib/llvm-project/compiler-rt/lib/builtins/int_lib.h index 713deddb5698..4a972da23fcc 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/int_lib.h +++ b/contrib/llvm-project/compiler-rt/lib/builtins/int_lib.h @@ -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 +#else #include +#endif #include #include #else