diff --git a/glx/glapi.c b/glx/glapi.c
index c4d101a..94a8043 100644
--- a/glx/glapi.c
+++ b/glx/glapi.c
@@ -63,6 +63,9 @@
 
 #include <stdlib.h>
 #include <string.h>
+#ifdef DEBUG
+#include <assert.h>
+#endif
 
 #include "glapi.h"
 #include "glapioffsets.h"
