diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 402971b64fa..dc37b960859 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-29  Joel Brobecker  <brobecker@adacore.com>
+
+	* common/filestuff.c: Replace #include <dirent.h> by
+	#include "gdb_dirent.h".
+
 2013-04-29  Joel Brobecker  <brobecker@adacore.com>
 
 	* common/filestuff.c: Replace #include <sys/stat.h> by
diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c
index 0271ea8b5ac..68f66ca6d0f 100644
--- a/gdb/common/filestuff.c
+++ b/gdb/common/filestuff.c
@@ -56,7 +56,7 @@
 
 #ifndef HAVE_FDWALK
 
-#include <dirent.h>
+#include "gdb_dirent.h"
 
 /* Replacement for fdwalk, if the system doesn't define it.  Walks all
    open file descriptors (though this implementation may walk closed