Fixed linker errors in debug builds with gcc 4.3.2
This commit is contained in:
parent
541f8eee46
commit
84730dfe5b
1 changed files with 7 additions and 0 deletions
|
@ -125,7 +125,14 @@ void* allocate_chunk_from_block(Block* b)
|
|||
return result;
|
||||
}
|
||||
|
||||
// inline causes linker errors in debug builds with gcc 4.3.2(-std=c99 and -O0)
|
||||
#ifdef DEBUG
|
||||
#define inline
|
||||
#endif
|
||||
inline Block* get_block_from_chunk(void* chunk)
|
||||
#ifdef DEBUG
|
||||
#undef inline
|
||||
#endif
|
||||
{
|
||||
int8_t* block_ptr = ((int8_t*)chunk) - ((uintptr_t)chunk)%BLOCK_SIZE;
|
||||
return (Block*)block_ptr;
|
||||
|
|
Loading…
Add table
Reference in a new issue