diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-09-27 09:22:19 +0100 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-11-02 13:41:33 +0000 |
commit | b4cf974a3256275fe2c03d8eaaf07a5e5b337cfc (patch) | |
tree | c7952a6509d7b48a72ae1322e75d110835f4a523 /lib/libc | |
parent | b3e9214e96eb2a5a5eb94127037eecfee81d3509 (diff) |
libc: Adapt strlcpy to this codebase
Change-Id: I2f5f64aaf90caae936510e1179392a8835f493e0
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/libc.mk | 1 | ||||
-rw-r--r-- | lib/libc/strlcpy.c | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/libc.mk b/lib/libc/libc.mk index daa2ec10..1276f5c8 100644 --- a/lib/libc/libc.mk +++ b/lib/libc/libc.mk @@ -19,6 +19,7 @@ LIBC_SRCS := $(addprefix lib/libc/, \ snprintf.c \ strchr.c \ strcmp.c \ + strlcpy.c \ strlen.c \ strncmp.c \ strnlen.c \ diff --git a/lib/libc/strlcpy.c b/lib/libc/strlcpy.c index 019d2316..c4f39bb9 100644 --- a/lib/libc/strlcpy.c +++ b/lib/libc/strlcpy.c @@ -1,6 +1,8 @@ /* $OpenBSD: strlcpy.c,v 1.12 2015/01/15 03:54:12 millert Exp $ */ /* + * SPDX-License-Identifier: ISC + * * Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com> * * Permission to use, copy, modify, and distribute this software for any @@ -16,10 +18,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - -#include <sys/types.h> +#include <stdint.h> #include <string.h> /* @@ -28,7 +27,7 @@ __FBSDID("$FreeBSD$"); * Returns strlen(src); if retval >= dsize, truncation occurred. */ size_t -strlcpy(char * __restrict dst, const char * __restrict src, size_t dsize) +strlcpy(char * dst, const char * src, size_t dsize) { const char *osrc = src; size_t nleft = dsize; |