diff --git a/components/libc_stub/newlib_stub.c b/components/libc_stub/newlib_stub.c index 6df15aa0e0f33c0813bd4666e1eb8f4305a6c72c..046d253804d619fad7ec7640d8db9037267bbd4e 100644 --- a/components/libc_stub/newlib_stub.c +++ b/components/libc_stub/newlib_stub.c @@ -369,6 +369,12 @@ void *__wrap__malloc_r(struct _reent *ptr, size_t size) return mem; } +void *__wrap__memalign_r(struct _reent *ptr, size_t boundary, size_t size) +{ + printf("Error! Function \"memalign\" not supported !\n"); + return NULL; +} + void *__wrap__realloc_r(struct _reent *ptr, void *old, size_t newlen) { void *mem; diff --git a/hardware/chip/x2000/package.yaml b/hardware/chip/x2000/package.yaml index 2500639ea5bdb5441f1f64724f033a4ec9f1b730..a6c64f7321e765d519e443d4419b9d6dc70c9393 100644 --- a/hardware/chip/x2000/package.yaml +++ b/hardware/chip/x2000/package.yaml @@ -96,6 +96,7 @@ build_config: -Wl,--wrap=localtime_r -Wl,--wrap=localtime -Wl,--wrap=_malloc_r + -Wl,--wrap=_memalign_r -Wl,--wrap=_realloc_r -Wl,--wrap=_calloc_r -Wl,--wrap=_free_r