From 8f0baadaa0a3e77e70a85474f2262ee28e637ccb Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Fri, 1 May 2015 19:14:32 +0000 Subject: [PATCH] Move reallocarray definition to the _BSD_VISIBLE block Add the required __alloc_size attributes Requested by: pfg --- include/stdlib.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/stdlib.h b/include/stdlib.h index 84587db8e626..1c4fbb040639 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -111,9 +111,6 @@ long double strtold(const char * __restrict, char ** __restrict); unsigned long strtoul(const char * __restrict, char ** __restrict, int); -#ifdef __BSD_VISIBLE -void *reallocarray(void *, size_t, size_t); -#endif int system(const char *); int wctomb(char *, wchar_t); size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); @@ -306,6 +303,8 @@ void qsort_r(void *, size_t, size_t, void *, int (*)(void *, const void *, const void *)); int radixsort(const unsigned char **, int, const unsigned char *, unsigned); +void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2) + __alloc_size(3); void *reallocf(void *, size_t) __result_use_check __alloc_size(2); int rpmatch(const char *); void setprogname(const char *);