From 7cc9f69fd9764ed41fbcf8d11da8ec49dbf8c7c8 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 13 Feb 2001 15:14:22 +0000 Subject: [PATCH] (directory_files_internal): Initialize errno. (toplevel): Include errno.h. --- src/ChangeLog | 5 +++++ src/dired.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index d0217b2e975..b87ddc0da78 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-02-13 Gerd Moellmann + + * dired.c (directory_files_internal): Initialize errno. + (toplevel): Include errno.h. + 2001-02-12 Andrew Innes The following changes are to draw box lines inside characters area diff --git a/src/dired.c b/src/dired.c index 4994241c2cf..f3f13534a87 100644 --- a/src/dired.c +++ b/src/dired.c @@ -27,6 +27,7 @@ Boston, MA 02111-1307, USA. */ #include #include "systime.h" +#include #ifdef VMS #include @@ -208,6 +209,7 @@ directory_files_internal (directory, full, match, nosort, attrs) #endif /* not VMS */ /* Loop reading blocks until EOF or error. */ + errno = 0; while ((dp = readdir (d)) != NULL) { if (DIRENTRY_NONEMPTY (dp)) -- 2.39.5