diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2017-12-20 11:36:44 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-01-05 15:49:12 +0100 |
commit | 48e7b8ae0de2e3a7ec08286e764c46768da9b2bf (patch) | |
tree | d9f1e9f48902ee9a3f8ab865fac6ef71a7fd3954 /include | |
parent | 4797aa72b8e4f7696627f2459a0732d1ca51b37d (diff) | |
download | barebox-48e7b8ae0de2e3a7ec08286e764c46768da9b2bf.tar.gz barebox-48e7b8ae0de2e3a7ec08286e764c46768da9b2bf.tar.xz |
string.h: Implement strndup
I implemented this while trying to import mmc-utils into barebox. While
I didn't finish this import this function might still be useful for
someone?!
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/string.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/string.h b/include/linux/string.h index 5df8c50e57..ed4eeb5519 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -80,6 +80,9 @@ extern __kernel_size_t strnlen(const char *,__kernel_size_t); #ifndef __HAVE_ARCH_STRDUP extern char * strdup(const char *); #endif +#ifndef __HAVE_ARCH_STRNDUP +extern char *strndup(const char *, size_t); +#endif #ifndef __HAVE_ARCH_STRSWAB extern char * strswab(const char *); #endif |