summaryrefslogtreecommitdiff
path: root/src/doc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc.c')
-rw-r--r--src/doc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/doc.c b/src/doc.c
index 92c7b2c6dc9..168af6da94a 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
+#include <errno.h>
#include <sys/types.h>
#include <sys/file.h> /* Must be after sys/types.h for USG. */
#include <fcntl.h>
@@ -609,7 +610,11 @@ the same file name is found in the `doc-directory'. */)
fd = emacs_open (name, O_RDONLY, 0);
if (fd < 0)
- report_file_error ("Opening doc string file", build_string (name));
+ {
+ int open_errno = errno;
+ report_file_errno ("Opening doc string file", build_string (name),
+ open_errno);
+ }
Vdoc_file_name = filename;
filled = 0;
pos = 0;