diff options
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/compat-43/getwd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libc/compat-43/getwd.c b/lib/libc/compat-43/getwd.c index 668dae0..280236e 100644 --- a/lib/libc/compat-43/getwd.c +++ b/lib/libc/compat-43/getwd.c @@ -41,16 +41,14 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> #include <errno.h> #include <stdio.h> -#include <string.h> char * -getwd(buf) - char *buf; +getwd(char *buf) { char *p; if ( (p = getcwd(buf, MAXPATHLEN)) ) return(p); - (void)strcpy(buf, strerror(errno)); + (void)strerror_r(errno, buf, MAXPATHLEN); return((char *)NULL); } |