mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-04 06:30:10 +08:00
dietlibc support
This commit is contained in:
parent
8da6027e73
commit
c52df4de38
4
bcheck.c
4
bcheck.c
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
#define HAVE_MEMALIGN
|
#define HAVE_MEMALIGN
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#if defined(__FreeBSD__) || defined(__dietlibc__)
|
||||||
#warning Bound checking not fully supported on FreeBSD
|
#warning Bound checking not fully supported on FreeBSD
|
||||||
#undef CONFIG_TCC_MALLOC_HOOKS
|
#undef CONFIG_TCC_MALLOC_HOOKS
|
||||||
#undef HAVE_MEMALIGN
|
#undef HAVE_MEMALIGN
|
||||||
@ -782,7 +782,7 @@ void *__bound_calloc(size_t nmemb, size_t size)
|
|||||||
{
|
{
|
||||||
void *ptr;
|
void *ptr;
|
||||||
size = size * nmemb;
|
size = size * nmemb;
|
||||||
ptr = __bound_malloc(size);
|
ptr = __bound_malloc(size, NULL);
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
return NULL;
|
return NULL;
|
||||||
memset(ptr, 0, size);
|
memset(ptr, 0, size);
|
||||||
|
Loading…
Reference in New Issue
Block a user