diff --git a/src/header/malloc/cbindgen.toml b/src/header/malloc/cbindgen.toml index 2d6db57254..18db86526d 100644 --- a/src/header/malloc/cbindgen.toml +++ b/src/header/malloc/cbindgen.toml @@ -1,12 +1,25 @@ sys_includes = ["features.h", "stddef.h"] include_guard = "_RELIBC_MALLOC_H" trailer = """ +#ifndef _RELIBC_MALLOC_EXTRA_H +#define _RELIBC_MALLOC_EXTRA_H + +#ifdef __cplusplus +extern "C" { +#endif + void *calloc(size_t nelem, size_t elsize); void free(void *ptr); void *malloc(size_t size); void *memalign(size_t alignment, size_t size); void *realloc(void *ptr, size_t size); void *valloc(size_t size); + +#ifdef __cplusplus +} +#endif + +#endif """ language = "C" style = "Type"