diff --git a/plugins/qpa/eglhelpers.h b/plugins/qpa/eglhelpers.h
index 6c17923874..adf4711a51 100644
--- a/plugins/qpa/eglhelpers.h
+++ b/plugins/qpa/eglhelpers.h
@@ -20,9 +20,9 @@ along with this program. If not, see .
#pragma once
-#define MESA_EGL_NO_X11_HEADERS
#include
#include "fixqopengl.h"
+#include
#include
diff --git a/plugins/qpa/offscreensurface.h b/plugins/qpa/offscreensurface.h
index c69b3ad58e..a355fb4d5b 100644
--- a/plugins/qpa/offscreensurface.h
+++ b/plugins/qpa/offscreensurface.h
@@ -20,9 +20,9 @@ along with this program. If not, see .
#pragma once
-#define MESA_EGL_NO_X11_HEADERS
#include
#include "fixqopengl.h"
+#include
#include