mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
string: Allow arch override of strndup() also
At present architectures can override strdup() but not strndup(). Use the same option for both. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -93,8 +93,8 @@ size_t strcspn(const char *s, const char *reject);
|
|||||||
|
|
||||||
#ifndef __HAVE_ARCH_STRDUP
|
#ifndef __HAVE_ARCH_STRDUP
|
||||||
extern char * strdup(const char *);
|
extern char * strdup(const char *);
|
||||||
#endif
|
|
||||||
extern char * strndup(const char *, size_t);
|
extern char * strndup(const char *, size_t);
|
||||||
|
#endif
|
||||||
#ifndef __HAVE_ARCH_STRSWAB
|
#ifndef __HAVE_ARCH_STRSWAB
|
||||||
extern char * strswab(const char *);
|
extern char * strswab(const char *);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -324,7 +324,6 @@ char * strdup(const char *s)
|
|||||||
strcpy (new, s);
|
strcpy (new, s);
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
char * strndup(const char *s, size_t n)
|
char * strndup(const char *s, size_t n)
|
||||||
{
|
{
|
||||||
@@ -348,6 +347,7 @@ char * strndup(const char *s, size_t n)
|
|||||||
|
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __HAVE_ARCH_STRSPN
|
#ifndef __HAVE_ARCH_STRSPN
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user