diff --git a/repmgr-action-daemon.c b/repmgr-action-daemon.c
index 17c66c28..b97ec8b9 100644
--- a/repmgr-action-daemon.c
+++ b/repmgr-action-daemon.c
@@ -18,6 +18,7 @@
* along with this program. If not, see .
*/
+#include
#include /* for stat() */
#include "repmgr.h"
diff --git a/repmgr-client.c b/repmgr-client.c
index 83a4923d..dde5f332 100644
--- a/repmgr-client.c
+++ b/repmgr-client.c
@@ -54,6 +54,7 @@
#include
#include
+#include
#include "repmgr.h"
#include "compat.h"