diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-08-02 18:30:29 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-08-02 18:30:29 +0000 |
commit | dd6565b7a60d228f021190a538caeb652275dc5c (patch) | |
tree | d23d615f183cbdae25a532321e7e57394cbf0226 /contrib/llvm-project | |
parent | fd28fec2f0ba63a68ca0c9a041facc4fd86f4ba8 (diff) | |
download | src-test-dd6565b7a60d228f021190a538caeb652275dc5c.tar.gz src-test-dd6565b7a60d228f021190a538caeb652275dc5c.zip |
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
Notes
Notes:
svn path=/projects/clang1100-import/; revision=363778
Diffstat (limited to 'contrib/llvm-project')
-rw-r--r-- | contrib/llvm-project/compiler-rt/lib/builtins/int_lib.h | 6 |
1 files changed, 5 insertions, 1 deletions
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 713deddb5698f..4a972da23fccb 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 <sys/limits.h> +#else #include <machine/limits.h> +#endif #include <sys/stdint.h> #include <sys/types.h> #else |