aboutsummaryrefslogtreecommitdiff
path: root/pwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'pwd.c')
-rw-r--r--pwd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pwd.c b/pwd.c
index 893ed1e15..2ad019d50 100644
--- a/pwd.c
+++ b/pwd.c
@@ -1,12 +1,13 @@
1#include "internal.h" 1#include "internal.h"
2#include <stdio.h> 2#include <stdio.h>
3#include <dirent.h>
3 4
4const char pwd_usage[] = "Print the current directory.\n"; 5const char pwd_usage[] = "Print the current directory.\n";
5 6
6extern int 7extern int
7pwd_main(int argc, char * * argv) 8pwd_main(int argc, char * * argv)
8{ 9{
9 char buf[1024]; 10 char buf[NAME_MAX];
10 11
11 if ( getcwd(buf, sizeof(buf)) == NULL ) { 12 if ( getcwd(buf, sizeof(buf)) == NULL ) {
12 perror("get working directory"); 13 perror("get working directory");