[PATCH master 2/2] include: stdlib.h: define prototypes for malloc/free

Ahmad Fatoum a.fatoum at pengutronix.de
Wed Sep 11 04:13:18 PDT 2024


malloc(), free() and friends are declared in <stdlib.h> for hosted
implementations. Given that we have the header in barebox too, we should
define malloc(), free() as users porting userspace code may expect it
there.

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

diff --git a/include/stdlib.h b/include/stdlib.h
index 0305970557df..c427cbc87f6e 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -3,6 +3,7 @@
 #define __STDLIB_H
 
 #include <types.h>
+#include <malloc.h>
 
 #define RAND_MAX 32767
 
-- 
2.39.2




More information about the barebox mailing list