Unified · Split
| @@ -10,7 +10,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; · 9 unmodified lines | ||
| 10 | 10 | /* need to do that because of glibc 2.1 bug (should have a way to test |
| 11 | 11 | presence of 'long long' without __GNUC__, or TCC should define |
| 12 | 12 | __GNUC__ ? */ |
| 13 | −#ifndef __int8_t_defined | |
| 13 | +#if !defined(__int8_t_defined) && !defined(__dietlibc__) | |
| 14 | 14 | #define __int8_t_defined |
| 15 | 15 | typedef char int8_t; |
| 16 | 16 | typedef short int int16_t; |
| @@ -9076,15 +9076,19 @@ static int rt_get_caller_pc(unsigned long *paddr, · 9075 unmodified lines | ||
| 9076 | 9076 | int i; |
| 9077 | 9077 | |
| 9078 | 9078 | if (level == 0) { |
| 9079 | −#ifdef __FreeBSD__ | |
| 9079 | +#if defined(__FreeBSD__) | |
| 9080 | 9080 | *paddr = uc->uc_mcontext.mc_eip; |
| 9081 | +#elif defined(__dietlibc__) | |
| 9082 | + *paddr = uc->uc_mcontext.eip; | |
| 9081 | 9083 | #else |
| 9082 | 9084 | *paddr = uc->uc_mcontext.gregs[REG_EIP]; |
| 9083 | 9085 | #endif |
| 9084 | 9086 | return 0; |
| 9085 | 9087 | } else { |
| 9086 | −#ifdef __FreeBSD__ | |
| 9088 | +#if defined(__FreeBSD__) | |
| 9087 | 9089 | fp = uc->uc_mcontext.mc_ebp; |
| 9090 | +#elif defined(__dietlibc__) | |
| 9091 | + fp = uc->uc_mcontext.ebp; | |
| 9088 | 9092 | #else |
| 9089 | 9093 | fp = uc->uc_mcontext.gregs[REG_EBP]; |
| 9090 | 9094 | #endif |