Commit 1ea1c7d80f9dd7a4827cddf25fba71d0034510e4

Authored by Simon Glass
1 parent 1f6510c4cf

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>

Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff

include/linux/string.h
... ... @@ -93,8 +93,8 @@
93 93  
94 94 #ifndef __HAVE_ARCH_STRDUP
95 95 extern char * strdup(const char *);
96   -#endif
97 96 extern char * strndup(const char *, size_t);
  97 +#endif
98 98 #ifndef __HAVE_ARCH_STRSWAB
99 99 extern char * strswab(const char *);
100 100 #endif
... ... @@ -324,7 +324,6 @@
324 324 strcpy (new, s);
325 325 return new;
326 326 }
327   -#endif
328 327  
329 328 char * strndup(const char *s, size_t n)
330 329 {
... ... @@ -348,6 +347,7 @@
348 347  
349 348 return new;
350 349 }
  350 +#endif
351 351  
352 352 #ifndef __HAVE_ARCH_STRSPN
353 353 /**