From 9dde47f5798a73946d3f78da2e0daff23457ea31 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 27 Aug 1997 20:01:05 +0000 Subject: [PATCH] Include errno.h. (init_buffer) [HAVE_GETCWD]: Fix error message for getcwd failure. --- src/buffer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. */ #include #include #include +#include + +extern int errno; #ifndef MAXPATHLEN /* in 4.1, param.h fails to define this. */ @@ -3708,7 +3711,7 @@ init_buffer () strcpy (buf, pwd); #ifdef HAVE_GETCWD else if (getcwd (buf, MAXPATHLEN+1) == 0) - fatal ("`getcwd' failed: %s\n", buf); + fatal ("`getcwd' failed: %s\n", strerror (errno)); #else else if (getwd (buf) == 0) fatal ("`getwd' failed: %s\n", buf); -- 2.39.2