mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-27 11:32:08 +01:00
26 lines
574 B
Diff
26 lines
574 B
Diff
Author: Milan P. Stanić <mps@arvanta.net>
|
|
Date: Wed Nov 11 10:39:23 2020 +0000
|
|
|
|
add missing reallocarray function in musl, taken from musl mailing list
|
|
this fix should be removed when musl add this
|
|
|
|
--- a/quota.c 2020-09-21 11:33:19.000000000 +0000
|
|
+++ b/quota.c 2020-11-11 14:19:19.681307939 +0000
|
|
@@ -95,6 +95,16 @@
|
|
exit(1);
|
|
}
|
|
|
|
+void *reallocarray(void *ptr, size_t m, size_t n)
|
|
+{
|
|
+ if (n && m > -1 / n) {
|
|
+ errno = ENOMEM;
|
|
+ return 0;
|
|
+ }
|
|
+
|
|
+ return realloc(ptr, m * n);
|
|
+}
|
|
+
|
|
static void heading(int type, qid_t id, char *name, char *tag)
|
|
{
|
|
char *spacehdr;
|