diff --git a/src/dynlib.c b/src/dynlib.c
index ed4f157d0fe..1b66c4ad8e8 100644
--- a/src/dynlib.c
+++ b/src/dynlib.c
@@ -24,6 +24,8 @@ along with GNU Emacs. If not, see . */
If you think the abstraction is too leaky use libltdl (libtool),
don't reinvent the wheel by fixing this one. */
+#include
+
#include "dynlib.h"
#if defined _WIN32
diff --git a/src/dynlib.h b/src/dynlib.h
index bd03666b860..1282c4fd719 100644
--- a/src/dynlib.h
+++ b/src/dynlib.h
@@ -20,7 +20,6 @@ along with GNU Emacs. If not, see . */
#ifndef DYNLIB_H
#define DYNLIB_H
-#include
#include
typedef void *dynlib_handle_ptr;
diff --git a/src/emacs-module.c b/src/emacs-module.c
index e885af5de8f..25c5e019881 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -17,14 +17,16 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see . */
+#include
+
+#include "emacs-module.h"
+
#include
#include
#include
#include
-#include
#include "lisp.h"
-#include "emacs-module.h"
#include "dynlib.h"
#include "coding.h"
#include "verify.h"