--- a/server/php-runner.cpp
+++ b/server/php-runner.cpp
@@ -14,6 +14,10 @@
 #include <sys/time.h>
 #include <unistd.h>
 
+#ifdef __ANDROID__
+#define valloc(size) memalign(sysconf(_SC_PAGESIZE),size)
+#endif
+
 #include "common/fast-backtrace.h"
 #include "common/kernel-version.h"
 #include "common/kprintf.h"
