diff --git a/gfx/common/gl_common.c b/gfx/common/gl_common.c
index 623048b167..28180687dc 100644
--- a/gfx/common/gl_common.c
+++ b/gfx/common/gl_common.c
@@ -15,6 +15,10 @@
* If not, see .
*/
+#ifdef HAVE_CONFIG_H
+#include "../../config.h"
+#endif
+
#include
void gl_flush(void)