2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Add reallocarray() for those without it.

This commit is contained in:
Todd C. Miller
2015-05-14 10:13:18 -06:00
parent 0d418df037
commit 3595807f4e
5 changed files with 28 additions and 2 deletions

View File

@@ -368,7 +368,7 @@ __dso_public long long sudo_strtonum(const char *, long long, long long, const c
* All libc replacements are prefixed with "sudo_" to avoid namespace issues.
*/
struct timeval;
struct passwd;
struct timespec;
#ifndef HAVE_CLOSEFROM
@@ -479,5 +479,10 @@ __dso_public const char *sudo_getprogname(void);
# undef getprogname
# define getprogname() sudo_getprogname()
#endif /* HAVE_GETPROGNAME */
#ifndef HAVE_REALLOCARRAY
__dso_public void *sudo_reallocarray(void *ptr, size_t nmemb, size_t size);
# undef reallocarray
# define reallocarray(_a, _b, _c) sudo_reallocarray((_a), (_b), (_c))
#endif /* HAVE_REALLOCARRAY */
#endif /* _SUDO_COMPAT_H */