diff options
| author | Joerg Sonnenberger <joerg@bec.de> | 2013-12-03 16:19:14 +0000 |
|---|---|---|
| committer | Joerg Sonnenberger <joerg@bec.de> | 2013-12-03 16:19:14 +0000 |
| commit | 24f4a7dbec55f4d3859737071270db58feea664c (patch) | |
| tree | bbcfd1e95434732caa10ebb86d5cf1df5ba1efd2 | |
| parent | 1cd1444449cb68e2091e8f36785403288ebd3326 (diff) | |
| download | bcm5719-llvm-24f4a7dbec55f4d3859737071270db58feea664c.tar.gz bcm5719-llvm-24f4a7dbec55f4d3859737071270db58feea664c.zip | |
For libkern and libsa on NetBSD, the normal system headers can't be
used. Adjust.
llvm-svn: 196292
| -rw-r--r-- | compiler-rt/lib/int_lib.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/compiler-rt/lib/int_lib.h b/compiler-rt/lib/int_lib.h index a87426c513c..daeaa9e5706 100644 --- a/compiler-rt/lib/int_lib.h +++ b/compiler-rt/lib/int_lib.h @@ -31,11 +31,21 @@ # define COMPILER_RT_ABI #endif +#if defined(__NetBSD__) && (defined(_KERNEL) || defined(_STANDALONE)) +/* + * Kernel and boot environment can't use normal headers, + * so use the equivalent system headers. + */ +# include <machine/limits.h> +# include <sys/stdint.h> +# include <sys/types.h> +#else /* Include the standard compiler builtin headers we use functionality from. */ -#include <limits.h> -#include <stdint.h> -#include <stdbool.h> -#include <float.h> +# include <limits.h> +# include <stdint.h> +# include <stdbool.h> +# include <float.h> +#endif /* Include the commonly used internal type definitions. */ #include "int_types.h" |

