diff options
Diffstat (limited to 'pwd.c')
-rw-r--r-- | pwd.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -23,11 +23,12 @@ | |||
23 | #include "internal.h" | 23 | #include "internal.h" |
24 | #include <stdio.h> | 24 | #include <stdio.h> |
25 | #include <dirent.h> | 25 | #include <dirent.h> |
26 | #include <sys/param.h> | ||
26 | 27 | ||
27 | extern int | 28 | extern int |
28 | pwd_main(int argc, char * * argv) | 29 | pwd_main(int argc, char * * argv) |
29 | { | 30 | { |
30 | char buf[NAME_MAX]; | 31 | char buf[PATH_MAX + 1]; |
31 | 32 | ||
32 | if ( getcwd(buf, sizeof(buf)) == NULL ) { | 33 | if ( getcwd(buf, sizeof(buf)) == NULL ) { |
33 | perror("get working directory"); | 34 | perror("get working directory"); |