diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-04-04 13:06:57 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2017-04-04 13:19:18 +0300 |
commit | eb14d0cc649978c10928bf38c1847f295bf0de69 (patch) | |
tree | bb06ad61b8261bfc7a5cf3724f1715668e42d7eb /newlib/libc/include/stdlib.h | |
parent | 7c4ae7770ea1537ba3bed956d328fb48fdef708f (diff) |
Add BSD-specific reallocarray()
It is available in FreeBSD, NetBSD and OpenBSD, but not in glibc. It is
used for example by OpenSSH.
Diffstat (limited to 'newlib/libc/include/stdlib.h')
-rw-r--r-- | newlib/libc/include/stdlib.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h index 9ee32aced..968367f22 100644 --- a/newlib/libc/include/stdlib.h +++ b/newlib/libc/include/stdlib.h @@ -140,6 +140,8 @@ _VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, __compar_fn_t _c int _EXFUN(rand,(_VOID)); _PTR _EXFUN_NOTHROW(realloc,(_PTR __r, size_t __size)); #if __BSD_VISIBLE +void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2) + __alloc_size(3); _PTR _EXFUN(reallocf,(_PTR __r, size_t __size)); #endif #if __BSD_VISIBLE || __XSI_VISIBLE >= 4 |