diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/buffer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c index 2b4c18fa189..47b4f150363 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -23,6 +23,9 @@ Boston, MA 02111-1307, USA. */ | |||
| 23 | #include <sys/types.h> | 23 | #include <sys/types.h> |
| 24 | #include <sys/stat.h> | 24 | #include <sys/stat.h> |
| 25 | #include <sys/param.h> | 25 | #include <sys/param.h> |
| 26 | #include <errno.h> | ||
| 27 | |||
| 28 | extern int errno; | ||
| 26 | 29 | ||
| 27 | #ifndef MAXPATHLEN | 30 | #ifndef MAXPATHLEN |
| 28 | /* in 4.1, param.h fails to define this. */ | 31 | /* in 4.1, param.h fails to define this. */ |
| @@ -3708,7 +3711,7 @@ init_buffer () | |||
| 3708 | strcpy (buf, pwd); | 3711 | strcpy (buf, pwd); |
| 3709 | #ifdef HAVE_GETCWD | 3712 | #ifdef HAVE_GETCWD |
| 3710 | else if (getcwd (buf, MAXPATHLEN+1) == 0) | 3713 | else if (getcwd (buf, MAXPATHLEN+1) == 0) |
| 3711 | fatal ("`getcwd' failed: %s\n", buf); | 3714 | fatal ("`getcwd' failed: %s\n", strerror (errno)); |
| 3712 | #else | 3715 | #else |
| 3713 | else if (getwd (buf) == 0) | 3716 | else if (getwd (buf) == 0) |
| 3714 | fatal ("`getwd' failed: %s\n", buf); | 3717 | fatal ("`getwd' failed: %s\n", buf); |