diff --git a/src/x11_opengl.c b/src/x11_opengl.c
index 582fbe20..8fb11d60 100644
--- a/src/x11_opengl.c
+++ b/src/x11_opengl.c
@@ -30,6 +30,7 @@
 
 #include "internal.h"
 
+#include <string.h>
 #include <stdlib.h>