[PATCH v2 2/3] malloc: define malloc_add_pool outside of TLSF
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Dec 11 12:24:28 PST 2025
This function is currently being used by the EFI payload init ode.
Define a stub to allow allyesconfig to build it.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
v1 -> v2:
- new change
---
include/malloc.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/malloc.h b/include/malloc.h
index 31a2ff1b3d8e..bee998cd9079 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -26,6 +26,9 @@ void *malloc_add_pool(void *mem, size_t bytes);
void malloc_register_store(void (*cb)(size_t bytes));
bool malloc_store_is_registered(void);
#else
+#include <linux/bug.h>
+static inline void *malloc_add_pool(void *mem, size_t bytes) { BUG(); }
+static inline void malloc_register_store(void (*cb)(size_t bytes)) { BUG(); }
static inline bool malloc_store_is_registered(void) { return false; }
#endif
--
2.47.3
More information about the barebox
mailing list