[PATCH v2 02/16] xfuncs: include <malloc.h> for free definition

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Nov 25 07:12:14 PST 2024


xfuncs.h defines all the functions that panic on out-of-memory
condition, but doesn't actually define free, so let's fix that by
importing <malloc.h> inside.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 include/xfuncs.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/xfuncs.h b/include/xfuncs.h
index 60ec220bd9b8..9e09b88141a1 100644
--- a/include/xfuncs.h
+++ b/include/xfuncs.h
@@ -6,6 +6,7 @@
 #include <linux/compiler.h>
 #include <stdarg.h>
 #include <wchar.h>
+#include <malloc.h>
 
 void *xmalloc(size_t size) __xalloc_size(1);
 void *xrealloc(void *ptr, size_t size) __xrealloc_size(2);
-- 
2.39.5




More information about the barebox mailing list