compat: add fallback implementation for reallocarray(3)

This commit is contained in:
Đoàn Trần Công Danh
2020-09-15 08:21:50 +07:00
parent 175efaff30
commit 50439c9ca9
6 changed files with 30 additions and 5 deletions

View File

@ -108,3 +108,11 @@ size_t _sysprof_strlcpy (char *dest,
const char *src,
size_t dest_size);
#endif
#ifdef HAVE_REALLOCARRAY
# define _sysprof_reallocarray(p,m,n) reallocarray(p,m,n)
#else
void *_sysprof_reallocarray (void *ptr,
size_t m,
size_t n);
#endif