summaryrefslogtreecommitdiff
path: root/contrib/llvm-project
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-08-02 18:30:29 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-08-02 18:30:29 +0000
commitdd6565b7a60d228f021190a538caeb652275dc5c (patch)
treed23d615f183cbdae25a532321e7e57394cbf0226 /contrib/llvm-project
parentfd28fec2f0ba63a68ca0c9a041facc4fd86f4ba8 (diff)
downloadsrc-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.h6
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