Skip to contentSkip to conversation

sae: fix missing reallocarray definition

PATCH Superseded James Prestwood 1 participant 1 message Jan 26, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

James Prestwood

author
#0 lore raw

PATCH 1/1 sae: fix missing reallocarray definition

Building on GCC 8 resulted in this compiler error. Newer versions seem to find malloc.h without the include, but not on GCC 8.

src/sae.c:107:25: error: implicit declaration of function ‘reallocarray’; did you mean ‘realloc’? [-Werror=implicit-function-declaration]
sm->rejected_groups = reallocarray(NULL, 2, sizeof(uint16_t));

---
 src/sae.c | 2 ++
 1 file changed, 2 insertions(+)
src/sae.c +2 -0
index dc07db4b..9515b455 100644
@@ -24,6 +24,8 @@
 #include <config.h>
 #endif
 
+#include <malloc.h>
+
 #include <ell/ell.h>
 
 #include "src/missing.h"
Signature · 1 line
2.31.1