mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master 2/2] include: stdlib.h: define prototypes for malloc/free
Date: Wed, 11 Sep 2024 13:13:18 +0200	[thread overview]
Message-ID: <20240911111318.2963525-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240911111318.2963525-1-a.fatoum@pengutronix.de>

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@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




  reply	other threads:[~2024-09-11 11:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-11 11:13 [PATCH master 1/2] lib: jsmn: fix compilation error Ahmad Fatoum
2024-09-11 11:13 ` Ahmad Fatoum [this message]
2024-09-13  6:32 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240911111318.2963525-2-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox