It seems like every time I re-compile PHP I get some whacky error. Anyway, I was fortunate enough that a quick Googling found a solution from katmai for compile error.
I’m popping this up here as a reminder to my future self, as well as anyone else who stumbles into this.
If you get this error when attempting to compile PHP 5.3.3 with MySQLi on, in my case, Snow Leopard
Was solved with a simple patch to ext/mysqli/php_mysqli_structs.h
Index: ext/mysqli/php_mysqli_structs.h
===================================================================
--- ext/mysqli/php_mysqli_structs.h (revision 301474)
+++ ext/mysqli/php_mysqli_structs.h (working copy)
@@ -54,6 +54,7 @@
#define WE_HAD_MBSTATE_T
#endif
+#define HAVE_ULONG 1
#include <my_global.h>
#if !defined(HAVE_MBRLEN) && defined(WE_HAD_MBRLEN)