diff options
Diffstat (limited to 'lib/libc/string/strncpy.c')
| -rw-r--r-- | lib/libc/string/strncpy.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libc/string/strncpy.c b/lib/libc/string/strncpy.c index 3c02ccae41d8..2ffce161c5c5 100644 --- a/lib/libc/string/strncpy.c +++ b/lib/libc/string/strncpy.c @@ -44,8 +44,17 @@ __FBSDID("$FreeBSD$"); * Copy src to dst, truncating or null-padding to always copy n bytes. * Return dst. */ +#ifdef WEAK_STRNCPY +__weak_reference(__strncpy, strncpy); +#endif + char * -strncpy(char * __restrict dst, const char * __restrict src, size_t n) +#ifdef WEAK_STRNCPY +__strncpy +#else +strncpy +#endif +(char * __restrict dst, const char * __restrict src, size_t n) { if (n != 0) { char *d = dst; |
