summaryrefslogtreecommitdiff
path: root/lib/libc/string/strerror.c
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2003-04-29 21:13:50 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2003-04-29 21:13:50 +0000
commit5723e501abb675701352eb3e9fd58bb3cc2c649d (patch)
treee9749f1ff2693755bce73e10528fc8cc6a6563ea /lib/libc/string/strerror.c
parenta8b5a9cd120e319cacf1c68e4a257e6955e0d5d6 (diff)
Notes
Diffstat (limited to 'lib/libc/string/strerror.c')
-rw-r--r--lib/libc/string/strerror.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c
index 02fba0cfcd39..0c20ac38c289 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);
}