summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/gen/check_utility_compat.c9
-rw-r--r--lib/libc/gen/confstr.c5
-rw-r--r--lib/libc/gen/fmtmsg.c22
-rw-r--r--lib/libc/gen/getgrent.c4
-rw-r--r--lib/libc/gen/getpwent.c10
-rw-r--r--lib/libc/include/namespace.h2
-rw-r--r--lib/libc/include/un-namespace.h2
-rw-r--r--lib/libc/locale/setlocale.c4
-rw-r--r--lib/libc/net/getaddrinfo.c4
-rw-r--r--lib/libc/net/gethostbydns.c6
-rw-r--r--lib/libc/net/getnameinfo.c12
-rw-r--r--lib/libc/net/hesiod.c4
-rw-r--r--lib/libc/net/if_nametoindex.c2
-rw-r--r--lib/libc/nls/msgcat.c2
-rw-r--r--lib/libc/rpc/rpc_soc.c2
-rw-r--r--lib/libc/stdlib/realpath.c12
-rw-r--r--lib/libc/string/strerror.c8
-rw-r--r--lib/libc/string/strlcat.c5
-rw-r--r--lib/libc/string/strlcpy.c5
-rw-r--r--lib/libc/yp/yplib.c2
20 files changed, 71 insertions, 51 deletions
diff --git a/lib/libc/gen/check_utility_compat.c b/lib/libc/gen/check_utility_compat.c
index 0ccdec1..2a0db43 100644
--- a/lib/libc/gen/check_utility_compat.c
+++ b/lib/libc/gen/check_utility_compat.c
@@ -30,15 +30,12 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-/*
- * I din't use "namespace.h" here because none of the relevant utilities
- * are threaded, so I'm not concerned about cancellation points or other
- * niceties.
- */
+#include "namespace.h"
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include "un-namespace.h"
#ifndef LINE_MAX
#define LINE_MAX _POSIX2_LINE_MAX
@@ -55,7 +52,7 @@ check_utility_compat(const char *utility)
int len;
if ((p = getenv(_ENV_UTIL_COMPAT)) != NULL) {
- strlcpy(buf, p, sizeof buf);
+ _strlcpy(buf, p, sizeof buf);
} else {
if ((len = readlink(_PATH_UTIL_COMPAT, buf, sizeof buf)) < 0)
return 0;
diff --git a/lib/libc/gen/confstr.c b/lib/libc/gen/confstr.c
index 966c3fe..2885afd 100644
--- a/lib/libc/gen/confstr.c
+++ b/lib/libc/gen/confstr.c
@@ -37,13 +37,14 @@ static char sccsid[] = "@(#)confstr.c 8.1 (Berkeley) 6/4/93";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "namespace.h"
#include <sys/param.h>
-
#include <errno.h>
#include <limits.h>
#include <paths.h>
#include <string.h>
#include <unistd.h>
+#include "un-namespace.h"
size_t
@@ -114,7 +115,7 @@ confstr(int name, char *buf, size_t len)
docopy:
if (len != 0 && buf != NULL)
- strlcpy(buf, p, len);
+ _strlcpy(buf, p, len);
return (strlen(p) + 1);
default:
diff --git a/lib/libc/gen/fmtmsg.c b/lib/libc/gen/fmtmsg.c
index 6caabbb..a9b4e60 100644
--- a/lib/libc/gen/fmtmsg.c
+++ b/lib/libc/gen/fmtmsg.c
@@ -27,10 +27,12 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "namespace.h"
#include <fmtmsg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "un-namespace.h"
/* Default value for MSGVERB. */
#define DFLT_MSGVERB "label:severity:text:action:tag"
@@ -101,13 +103,13 @@ def:
#define INSERT_COLON \
if (*output != '\0') \
- strlcat(output, ": ", size)
+ _strlcat(output, ": ", size)
#define INSERT_NEWLINE \
if (*output != '\0') \
- strlcat(output, "\n", size)
+ _strlcat(output, "\n", size)
#define INSERT_SPACE \
if (*output != '\0') \
- strlcat(output, " ", size)
+ _strlcat(output, " ", size)
/*
* Returns NULL on memory allocation failure, otherwise returns a pointer to
@@ -139,20 +141,20 @@ printfmt(char *msgverb, long class, const char *label, int sev,
while ((comp = nextcomp(msgverb)) != NULL) {
if (strcmp(comp, "label") == 0 && label != MM_NULLLBL) {
INSERT_COLON;
- strlcat(output, label, size);
+ _strlcat(output, label, size);
} else if (strcmp(comp, "severity") == 0 && sevname != NULL) {
INSERT_COLON;
- strlcat(output, sevinfo(sev), size);
+ _strlcat(output, sevinfo(sev), size);
} else if (strcmp(comp, "text") == 0 && text != MM_NULLTXT) {
INSERT_COLON;
- strlcat(output, text, size);
+ _strlcat(output, text, size);
} else if (strcmp(comp, "action") == 0 && act != MM_NULLACT) {
INSERT_NEWLINE;
- strlcat(output, "TO FIX: ", size);
- strlcat(output, act, size);
+ _strlcat(output, "TO FIX: ", size);
+ _strlcat(output, act, size);
} else if (strcmp(comp, "tag") == 0 && tag != MM_NULLTAG) {
INSERT_SPACE;
- strlcat(output, tag, size);
+ _strlcat(output, tag, size);
}
}
INSERT_NEWLINE;
@@ -171,7 +173,7 @@ nextcomp(const char *msgverb)
char *retval;
if (*lmsgverb == '\0') {
- strlcpy(lmsgverb, msgverb, sizeof(lmsgverb));
+ _strlcpy(lmsgverb, msgverb, sizeof(lmsgverb));
retval = strtok_r(lmsgverb, ":", &state);
} else {
retval = strtok_r(NULL, ":", &state);
diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c
index d834d09..da50574 100644
--- a/lib/libc/gen/getgrent.c
+++ b/lib/libc/gen/getgrent.c
@@ -620,7 +620,7 @@ dns_group(void *retval, void *mdata, va_list ap)
* pointer for the member list terminator.
*/
adjsize = bufsize - _ALIGNBYTES - sizeof(char *);
- linesize = strlcpy(buffer, hes[0], adjsize);
+ linesize = _strlcpy(buffer, hes[0], adjsize);
if (linesize >= adjsize) {
*errnop = ERANGE;
rv = NS_RETURN;
@@ -721,7 +721,7 @@ nis_group(void *retval, void *mdata, va_list ap)
rv = NS_NOTFOUND;
switch (how) {
case nss_lt_name:
- if (strlcpy(buffer, name, bufsize) >= bufsize)
+ if (_strlcpy(buffer, name, bufsize) >= bufsize)
goto erange;
break;
case nss_lt_id:
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c
index 427a736..256595b 100644
--- a/lib/libc/gen/getpwent.c
+++ b/lib/libc/gen/getpwent.c
@@ -584,7 +584,7 @@ files_passwd(void *retval, void *mdata, va_list ap)
/* MAXLOGNAME includes NUL byte, but we do not
* include the NUL byte in the key.
*/
- namesize = strlcpy(&keybuf[1], name, sizeof(keybuf)-1);
+ namesize = _strlcpy(&keybuf[1], name, sizeof(keybuf)-1);
if (namesize >= sizeof(keybuf)-1) {
*errnop = EINVAL;
rv = NS_NOTFOUND;
@@ -897,7 +897,7 @@ dns_passwd(void *retval, void *mdata, va_list ap)
hes = NULL;
continue;
}
- linesize = strlcpy(buffer, hes[0], bufsize);
+ linesize = _strlcpy(buffer, hes[0], bufsize);
if (linesize >= bufsize) {
*errnop = ERANGE;
rv = NS_RETURN;
@@ -1055,7 +1055,7 @@ nis_passwd(void *retval, void *mdata, va_list ap)
rv = NS_NOTFOUND;
switch (how) {
case nss_lt_name:
- if (strlcpy(buffer, name, bufsize) >= bufsize)
+ if (_strlcpy(buffer, name, bufsize) >= bufsize)
goto erange;
break;
case nss_lt_id:
@@ -1215,7 +1215,7 @@ compat_use_template(struct passwd *pwd, struct passwd *template, char *buffer,
hold.field = NULL; \
else { \
hold.field = p; \
- p += strlcpy(p, pwd->field, eob-p) + 1; \
+ p += _strlcpy(p, pwd->field, eob-p) + 1; \
} \
} while (0)
COPY(pw_name);
@@ -1233,7 +1233,7 @@ compat_use_template(struct passwd *pwd, struct passwd *template, char *buffer,
pwd->field = NULL; \
else { \
pwd->field = p; \
- if ((n = strlcpy(p, q, eob-p)) >= eob-p) { \
+ if ((n = _strlcpy(p, q, eob-p)) >= eob-p) { \
free(copy); \
return (ERANGE); \
} \
diff --git a/lib/libc/include/namespace.h b/lib/libc/include/namespace.h
index e626200..6a7c68d 100644
--- a/lib/libc/include/namespace.h
+++ b/lib/libc/include/namespace.h
@@ -43,6 +43,8 @@
#define err _err
#define warn _warn
#define nsdispatch _nsdispatch
+#define strlcat _strlcat
+#define strlcpy _strlcpy
/*
* Prototypes for syscalls/functions that need to be overridden
diff --git a/lib/libc/include/un-namespace.h b/lib/libc/include/un-namespace.h
index eaa9471..f354f78 100644
--- a/lib/libc/include/un-namespace.h
+++ b/lib/libc/include/un-namespace.h
@@ -149,5 +149,7 @@ int _flock(int, int);
#undef err
#undef warn
#undef nsdispatch
+#undef strlcat
+#undef strlcpy
#endif /* _UN_NAMESPACE_H_ */
diff --git a/lib/libc/locale/setlocale.c b/lib/libc/locale/setlocale.c
index 525ca8f..ca550ae 100644
--- a/lib/libc/locale/setlocale.c
+++ b/lib/libc/locale/setlocale.c
@@ -41,6 +41,7 @@ static char sccsid[] = "@(#)setlocale.c 8.1 (Berkeley) 7/4/93";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "namespace.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
@@ -50,6 +51,7 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include "un-namespace.h"
#include "collate.h"
#include "lmonetary.h" /* for __monetary_load_locale() */
#include "lnumeric.h" /* for __numeric_load_locale() */
@@ -180,7 +182,7 @@ setlocale(category, locale)
errno = EINVAL;
return (NULL);
}
- (void)strlcpy(new_categories[i], locale,
+ (void)_strlcpy(new_categories[i], locale,
len + 1);
i++;
locale = r;
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index e2cb71a..2b8708a 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -853,7 +853,7 @@ get_canonname(pai, ai, str)
ai->ai_canonname = (char *)malloc(strlen(str) + 1);
if (ai->ai_canonname == NULL)
return EAI_MEMORY;
- strlcpy(ai->ai_canonname, str, strlen(str) + 1);
+ _strlcpy(ai->ai_canonname, str, strlen(str) + 1);
}
return 0;
}
@@ -1305,7 +1305,7 @@ getanswer(answer, anslen, qname, qtype, pai)
had_error++;
continue;
}
- strlcpy(bp, tbuf, ep - bp);
+ _strlcpy(bp, tbuf, ep - bp);
canonname = bp;
bp += n;
continue;
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c
index 02cd223..9eeba2f 100644
--- a/lib/libc/net/gethostbydns.c
+++ b/lib/libc/net/gethostbydns.c
@@ -60,6 +60,7 @@ static char fromrcsid[] = "From: Id: gethnamaddr.c,v 8.23 1998/04/07 04:59:46 vi
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "namespace.h"
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
@@ -78,6 +79,7 @@ __FBSDID("$FreeBSD$");
#include <syslog.h>
#include <stdarg.h>
#include <nsswitch.h>
+#include "un-namespace.h"
#include "res_config.h"
@@ -674,7 +676,7 @@ _dns_gethostbyaddr(void *rval, void *cb_data, va_list ap)
uaddr[n] & 0xf,
(uaddr[n] >> 4) & 0xf));
}
- strlcat(qbuf, "ip6.arpa", sizeof(qbuf));
+ _strlcat(qbuf, "ip6.arpa", sizeof(qbuf));
break;
default:
abort();
@@ -686,7 +688,7 @@ _dns_gethostbyaddr(void *rval, void *cb_data, va_list ap)
n = res_query(qbuf, C_IN, T_PTR, (u_char *)buf->buf, sizeof buf->buf);
if (n < 0 && af == AF_INET6) {
*qp = '\0';
- strlcat(qbuf, "ip6.int", sizeof(qbuf));
+ _strlcat(qbuf, "ip6.int", sizeof(qbuf));
n = res_query(qbuf, C_IN, T_PTR, (u_char *)buf->buf,
sizeof buf->buf);
}
diff --git a/lib/libc/net/getnameinfo.c b/lib/libc/net/getnameinfo.c
index cee07f6..1aec5be 100644
--- a/lib/libc/net/getnameinfo.c
+++ b/lib/libc/net/getnameinfo.c
@@ -46,6 +46,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "namespace.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
@@ -57,6 +58,7 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <stddef.h>
#include <errno.h>
+#include "un-namespace.h"
static const struct afd {
int a_af;
@@ -145,12 +147,12 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
if (sp) {
if (strlen(sp->s_name) + 1 > servlen)
return EAI_MEMORY;
- strlcpy(serv, sp->s_name, servlen);
+ _strlcpy(serv, sp->s_name, servlen);
} else {
snprintf(numserv, sizeof(numserv), "%u", ntohs(port));
if (strlen(numserv) + 1 > servlen)
return EAI_MEMORY;
- strlcpy(serv, numserv, servlen);
+ _strlcpy(serv, numserv, servlen);
}
}
@@ -223,7 +225,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
numaddrlen = strlen(numaddr);
if (numaddrlen + 1 > hostlen) /* don't forget terminator */
return EAI_MEMORY;
- strlcpy(host, numaddr, hostlen);
+ _strlcpy(host, numaddr, hostlen);
break;
}
} else {
@@ -246,7 +248,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
freehostent(hp);
return EAI_MEMORY;
}
- strlcpy(host, hp->h_name, hostlen);
+ _strlcpy(host, hp->h_name, hostlen);
freehostent(hp);
} else {
if (flags & NI_NAMEREQD)
@@ -293,7 +295,7 @@ ip6_parsenumeric(sa, addr, host, hostlen, flags)
numaddrlen = strlen(numaddr);
if (numaddrlen + 1 > hostlen) /* don't forget terminator */
return EAI_MEMORY;
- strlcpy(host, numaddr, hostlen);
+ _strlcpy(host, numaddr, hostlen);
if (((const struct sockaddr_in6 *)sa)->sin6_scope_id) {
char zonebuf[MAXHOSTNAMELEN];
diff --git a/lib/libc/net/hesiod.c b/lib/libc/net/hesiod.c
index c22bdba..214f86e 100644
--- a/lib/libc/net/hesiod.c
+++ b/lib/libc/net/hesiod.c
@@ -51,6 +51,7 @@ static char *orig_rcsid = "$NetBSD: hesiod.c,v 1.9 1999/02/11 06:16:38 simonb Ex
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "namespace.h"
#include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h>
@@ -64,6 +65,7 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include "un-namespace.h"
struct hesiod_p {
char *lhs; /* normally ".ns" */
@@ -163,7 +165,7 @@ hesiod_to_bind(void *context, const char *name, const char *type)
const char *rhs;
int len;
- if (strlcpy(bindname, name, sizeof(bindname)) >= sizeof(bindname)) {
+ if (_strlcpy(bindname, name, sizeof(bindname)) >= sizeof(bindname)) {
errno = EMSGSIZE;
return NULL;
}
diff --git a/lib/libc/net/if_nametoindex.c b/lib/libc/net/if_nametoindex.c
index d0ca521..887d64f 100644
--- a/lib/libc/net/if_nametoindex.c
+++ b/lib/libc/net/if_nametoindex.c
@@ -70,7 +70,7 @@ if_nametoindex(const char *ifname)
s = _socket(AF_INET, SOCK_DGRAM, 0);
if (s != -1) {
- strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
+ _strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
if (_ioctl(s, SIOCGIFINDEX, &ifr) != -1) {
_close(s);
return (ifr.ifr_index);
diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c
index 4d44618..55ed59b 100644
--- a/lib/libc/nls/msgcat.c
+++ b/lib/libc/nls/msgcat.c
@@ -160,7 +160,7 @@ catopen(name, type)
put_tmpptr:
spcleft = sizeof(path) -
(pathP - path) - 1;
- if (strlcpy(pathP, tmpptr, spcleft) >=
+ if (_strlcpy(pathP, tmpptr, spcleft) >=
spcleft) {
too_long:
free(plang);
diff --git a/lib/libc/rpc/rpc_soc.c b/lib/libc/rpc/rpc_soc.c
index 9a58fc5..13a68f6 100644
--- a/lib/libc/rpc/rpc_soc.c
+++ b/lib/libc/rpc/rpc_soc.c
@@ -535,7 +535,7 @@ svcunix_create(sock, sendsize, recvsize, path)
memset(&sun, 0, sizeof sun);
sun.sun_family = AF_LOCAL;
- if (strlcpy(sun.sun_path, path, sizeof(sun.sun_path)) >=
+ if (_strlcpy(sun.sun_path, path, sizeof(sun.sun_path)) >=
sizeof(sun.sun_path))
goto done;
sun.sun_len = SUN_LEN(&sun);
diff --git a/lib/libc/stdlib/realpath.c b/lib/libc/stdlib/realpath.c
index c269471..93a9856 100644
--- a/lib/libc/stdlib/realpath.c
+++ b/lib/libc/stdlib/realpath.c
@@ -67,14 +67,14 @@ realpath(const char *path, char resolved[PATH_MAX])
if (path[1] == '\0')
return (resolved);
resolved_len = 1;
- left_len = strlcpy(left, path + 1, sizeof(left));
+ left_len = _strlcpy(left, path + 1, sizeof(left));
} else {
if (getcwd(resolved, PATH_MAX) == NULL) {
- strlcpy(resolved, ".", PATH_MAX);
+ _strlcpy(resolved, ".", PATH_MAX);
return (NULL);
}
resolved_len = strlen(resolved);
- left_len = strlcpy(left, path, sizeof(left));
+ left_len = _strlcpy(left, path, sizeof(left));
}
if (left_len >= sizeof(left) || resolved_len >= PATH_MAX) {
errno = ENAMETOOLONG;
@@ -131,7 +131,7 @@ realpath(const char *path, char resolved[PATH_MAX])
* lstat() fails we still can return successfully if
* there are no more path components left.
*/
- resolved_len = strlcat(resolved, next_token, PATH_MAX);
+ resolved_len = _strlcat(resolved, next_token, PATH_MAX);
if (resolved_len >= PATH_MAX) {
errno = ENAMETOOLONG;
return (NULL);
@@ -177,13 +177,13 @@ realpath(const char *path, char resolved[PATH_MAX])
symlink[slen] = '/';
symlink[slen + 1] = 0;
}
- left_len = strlcat(symlink, left, sizeof(left));
+ left_len = _strlcat(symlink, left, sizeof(left));
if (left_len >= sizeof(left)) {
errno = ENAMETOOLONG;
return (NULL);
}
}
- left_len = strlcpy(left, symlink, sizeof(left));
+ left_len = _strlcpy(left, symlink, sizeof(left));
}
}
diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c
index 02fba0c..0c20ac3 100644
--- a/lib/libc/string/strerror.c
+++ b/lib/libc/string/strerror.c
@@ -37,9 +37,11 @@ static char sccsid[] = "@(#)strerror.c 8.1 (Berkeley) 6/4/93";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "namespace.h"
#include <errno.h>
#include <stdio.h>
#include <string.h>
+#include "un-namespace.h"
#define UPREFIX "Unknown error: "
@@ -69,8 +71,8 @@ errstr(int num, char *buf, size_t len)
} while (uerr /= 10);
if (num < 0)
*--t = '-';
- strlcpy(buf, UPREFIX, len);
- strlcat(buf, t, len);
+ _strlcpy(buf, UPREFIX, len);
+ _strlcat(buf, t, len);
}
int
@@ -81,7 +83,7 @@ strerror_r(int errnum, char *strerrbuf, size_t buflen)
errstr(errnum, strerrbuf, buflen);
return (EINVAL);
}
- if (strlcpy(strerrbuf, sys_errlist[errnum], buflen) >= buflen)
+ if (_strlcpy(strerrbuf, sys_errlist[errnum], buflen) >= buflen)
return (ERANGE);
return (0);
}
diff --git a/lib/libc/string/strlcat.c b/lib/libc/string/strlcat.c
index 2c2fa56..cd9fc43 100644
--- a/lib/libc/string/strlcat.c
+++ b/lib/libc/string/strlcat.c
@@ -33,9 +33,12 @@ static char *rcsid = "$OpenBSD: strlcat.c,v 1.2 1999/06/17 16:28:58 millert Exp
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "namespace.h"
#include <sys/types.h>
#include <string.h>
+#include "un-namespace.h"
+__weak_reference(_strlcat, strlcat);
/*
* Appends src to string dst of size siz (unlike strncat, siz is the
* full size of dst, not space left). At most siz-1 characters
@@ -44,7 +47,7 @@ __FBSDID("$FreeBSD$");
* If retval >= siz, truncation occurred.
*/
size_t
-strlcat(dst, src, siz)
+_strlcat(dst, src, siz)
char *dst;
const char *src;
size_t siz;
diff --git a/lib/libc/string/strlcpy.c b/lib/libc/string/strlcpy.c
index a8a6cb7..74f511d 100644
--- a/lib/libc/string/strlcpy.c
+++ b/lib/libc/string/strlcpy.c
@@ -33,15 +33,18 @@ static char *rcsid = "$OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "namespace.h"
#include <sys/types.h>
#include <string.h>
+#include "un-namespace.h"
+__weak_reference(_strlcpy, strlcpy);
/*
* Copy src to string dst of size siz. At most siz-1 characters
* will be copied. Always NUL terminates (unless siz == 0).
* Returns strlen(src); if retval >= siz, truncation occurred.
*/
-size_t strlcpy(dst, src, siz)
+size_t _strlcpy(dst, src, siz)
char *dst;
const char *src;
size_t siz;
diff --git a/lib/libc/yp/yplib.c b/lib/libc/yp/yplib.c
index 6087f2b..b1d5913 100644
--- a/lib/libc/yp/yplib.c
+++ b/lib/libc/yp/yplib.c
@@ -509,7 +509,7 @@ skipit:
*(u_short *)&ypbr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_port;
gotit:
ysd->dom_vers = YPVERS;
- strlcpy(ysd->dom_domain, dom, sizeof(ysd->dom_domain));
+ _strlcpy(ysd->dom_domain, dom, sizeof(ysd->dom_domain));
}
/* Don't rebuild the connection to the server unless we have to. */
OpenPOWER on IntegriCloud