lib/string.c: drop pointless __HAVE_ARCH_STRDUP

There has never been an arch-specific optimized implementation of
str[n]dup, nor is there likely to ever be one, because unlike their
cousins strlen(), strcpy() and similar that simply read/write the
src/dst, the dup functions by definition involve memory allocation. So
drop this irrelevant cpp guard.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
This commit is contained in:
Rasmus Villemoes
2026-04-21 09:54:33 +02:00
committed by Tom Rini
parent 719cacb92e
commit 349d148f16
2 changed files with 1 additions and 4 deletions

View File

@@ -101,10 +101,9 @@ size_t strcspn(const char *s, const char *reject);
# define strndup sandbox_strndup
#endif
#ifndef __HAVE_ARCH_STRDUP
extern char * strdup(const char *);
extern char * strndup(const char *, size_t);
#endif
#ifndef __HAVE_ARCH_STRSWAB
extern char * strswab(const char *);
#endif