diff options
Diffstat (limited to 'libbacktrace/backtrace.h')
-rw-r--r-- | libbacktrace/backtrace.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/libbacktrace/backtrace.h b/libbacktrace/backtrace.h index a8d1ffc..b8404ea 100644 --- a/libbacktrace/backtrace.h +++ b/libbacktrace/backtrace.h @@ -34,9 +34,26 @@ POSSIBILITY OF SUCH DAMAGE. */ #define BACKTRACE_H #include <stddef.h> -#include <stdint.h> #include <stdio.h> +/* We want to get a definition for uintptr_t, but we still care about + systems that don't have <stdint.h>. */ +#if defined(__GLIBC__) && __GLIBC__ >= 2 + +#include <stdint.h> + +#elif defined(HAVE_STDINT_H) + +#include <stdint.h> + +#else + +/* Systems that don't have <stdint.h> must provide gstdint.h, e.g., + from GCC_HEADER_STDINT in configure.ac. */ +#include "gstdint.h" + +#endif + #ifdef __cplusplus extern "C" { #endif |