summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/opendir.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index bab5ba21a0..52fe92dafb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-09-14 Eric Blake <eblake@redhat.com>
+
+ opendir: avoid compile warning
+ * lib/opendir.c (includes): Always include errno.h.
+ Reported by Tatsuro MATSUOKA.
+
2011-09-14 Jim Meyering <meyering@redhat.com>
maint.mk: sc_tight_scope: propagate failure from sub-make
diff --git a/lib/opendir.c b/lib/opendir.c
index cb7f67c101..06c611f2e1 100644
--- a/lib/opendir.c
+++ b/lib/opendir.c
@@ -19,6 +19,8 @@
/* Specification. */
#include <dirent.h>
+#include <errno.h>
+
#if HAVE_OPENDIR
/* Override opendir(), to keep track of the open file descriptors.
@@ -26,7 +28,6 @@
#else
-# include <errno.h>
# include <stddef.h>
# include <stdlib.h>