mirror of
https://github.com/u-boot/u-boot.git
synced 2025-01-20 17:53:33 +08:00
sandbox: Rename strdup() functions
These functions include calls to a memory-allocation routine and so need to use the system routine when called from a library. To preserve access to these functions for libraries that need it, such as SDL, rename these functions within U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
1ea1c7d80f
commit
f72bdc60b2
@ -91,6 +91,11 @@ extern __kernel_size_t strnlen(const char *,__kernel_size_t);
|
|||||||
size_t strcspn(const char *s, const char *reject);
|
size_t strcspn(const char *s, const char *reject);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_SANDBOX
|
||||||
|
# define strdup sandbox_strdup
|
||||||
|
# define strndup sandbox_strndup
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __HAVE_ARCH_STRDUP
|
#ifndef __HAVE_ARCH_STRDUP
|
||||||
extern char * strdup(const char *);
|
extern char * strdup(const char *);
|
||||||
extern char * strndup(const char *, size_t);
|
extern char * strndup(const char *, size_t);
|
||||||
|
Loading…
Reference in New Issue
Block a user