--- a/ext/misc/pcachetrace.c
+++ b/ext/misc/pcachetrace.c
@@ -24,6 +24,7 @@
 #include <assert.h>
 #include <string.h>
 #include <stdio.h>
+#include "sqlite3.h"
 
 /* The original page cache routines */
 static sqlite3_pcache_methods2 pcacheBase;
