void-packages/srcpkgs/wireplumber/patches/reallocarray.patch

16 lines
453 B
Diff
Raw Normal View History

2021-05-07 22:06:27 +02:00
musl <1.2.2 doesn't have this function
diff --git a/lib/wpipc/utils.c b/lib/wpipc/utils.c
index 77754fd..e88b2e0 100644
--- a/lib/wpipc/utils.c
+++ b/lib/wpipc/utils.c
@@ -188,7 +188,7 @@ again:
/* realloc if we need more space, and read again */
if (n >= size) {
*max_size += *max_size;
- *buffer = reallocarray (*buffer, *max_size, sizeof (uint8_t));
+ *buffer = realloc (*buffer, *max_size);
offset += n;
goto again;
}