--- a/php_ext/ming.c	2012-03-22 15:50:14.323362216 +0900
+++ b/php_ext/ming.c	2012-03-22 15:50:50.963362056 +0900
@@ -87,10 +87,17 @@
 static SWFMatrix getMatrix(zval *id TSRMLS_DC);
 #endif
 
+#if PHP_API_VERSION < 20100412
 #define PHP_MING_FILE_CHK(file) \
 	if ((PG(safe_mode) && !php_checkuid((file), NULL, CHECKUID_CHECK_FILE_AND_DIR)) || php_check_open_basedir((file) TSRMLS_CC)) {	\
 		RETURN_FALSE;	\
-	}	\
+	}
+#else
+#define PHP_MING_FILE_CHK(file) \
+	if (php_check_open_basedir((file) TSRMLS_CC)) {	\
+		RETURN_FALSE;	\
+	}
+#endif
 
 /* {{{ proto void ming_setcubicthreshold (int threshold)
    Set cubic threshold (?) */
