aboutsummaryrefslogtreecommitdiff
path: root/src/compat.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-02-18 12:50:47 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-02-18 12:50:47 -0500
commit0790f1e63c45eabaeb61b7dfa4a0d9d4ff824124 (patch)
tree3ecc057366c6b7ef8c6b989ba7c6a906951cc68d /src/compat.c
parentc55d19d5d665e5d1704e43c9e3dea3c8a69eed71 (diff)
downloadspmc-0790f1e63c45eabaeb61b7dfa4a0d9d4ff824124.tar.gz
Allow compilation on OSX. Not much else I assume
Diffstat (limited to 'src/compat.c')
-rw-r--r--src/compat.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/compat.c b/src/compat.c
index 062c939..5fd2cc4 100644
--- a/src/compat.c
+++ b/src/compat.c
@@ -13,4 +13,11 @@ char *strsep(char **sp, char *sep)
*sp = p;
return(s);
}
-#endif \ No newline at end of file
+#endif
+
+#ifndef HAVE_REALLOCARRAY
+#include <stdlib.h>
+void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) {
+ return realloc(__ptr, __nmemb * __size);
+}
+#endif