diff --git a/mtk/meson.build b/mtk/meson.build
index e86f2a01f..0de6b8a7b 100644
--- a/mtk/meson.build
+++ b/mtk/meson.build
@@ -2,7 +2,10 @@ mtk_includesubdir = pkgname / 'mtk'
mtk_includedir = includedir / mtk_includesubdir
mtk_includepath = include_directories('.', 'mtk')
-mtk_includes = [mtk_includepath]
+mtk_includes = [
+ mtk_includepath,
+ top_includepath,
+]
mtk_c_args = [
'-DMTK_SYSCONFDIR="@0@"'.format(prefix / sysconfdir),
diff --git a/mtk/mtk/mtk-rectangle.c b/mtk/mtk/mtk-rectangle.c
index 35b194348..7b9b0f213 100644
--- a/mtk/mtk/mtk-rectangle.c
+++ b/mtk/mtk/mtk-rectangle.c
@@ -19,6 +19,8 @@
* License along with this library. If not, see .
*/
+#include "config.h"
+
#include "mtk/mtk-rectangle.h"
diff --git a/mtk/mtk/mtk-x11-errors.c b/mtk/mtk/mtk-x11-errors.c
index fa9d8cc46..b6e955527 100644
--- a/mtk/mtk/mtk-x11-errors.c
+++ b/mtk/mtk/mtk-x11-errors.c
@@ -23,6 +23,8 @@
* Mutter X error handling
*/
+#include "config.h"
+
#include "mtk/mtk-x11-errors.h"
#include