diff --git a/src/engine.c b/src/engine.c
index ec7edea0318c65ce6ffa74902a91e93d2d4bc386..d6412a75f695687c9ec907d74f3456923bc3d68e 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -65,6 +65,7 @@
 #include "equation_of_state.h"
 #include "error.h"
 #include "feedback.h"
+#include "fof.h"
 #include "gravity.h"
 #include "gravity_cache.h"
 #include "hydro.h"
diff --git a/src/engine_fof.c b/src/engine_fof.c
index 961b7e966ecc33250c3d005d3a31d59200f98fb0..bbecc54a9dd5a5aa9cbdb62b15a0fc621791ebb5 100644
--- a/src/engine_fof.c
+++ b/src/engine_fof.c
@@ -25,6 +25,9 @@
 /* This object's header. */
 #include "engine.h"
 
+/* Local headers. */
+#include "fof.h"
+
 /**
  * @brief Activate all the #gpart communications in preparation
  * fof a call to FOF.
diff --git a/src/runner_others.c b/src/runner_others.c
index 8231b520e7436c40c151200c066b63f4b9c41b86..6dcc92d8a492621346f92e455bbb02fae88e1fb0 100644
--- a/src/runner_others.c
+++ b/src/runner_others.c
@@ -45,6 +45,7 @@
 #include "engine.h"
 #include "error.h"
 #include "feedback.h"
+#include "fof.h"
 #include "gravity.h"
 #include "hydro.h"
 #include "logger.h"