diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2013-07-31 03:22:34 +0400 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2013-07-31 03:22:34 +0400 |
| commit | f3aca8bc4dd2556bb1db476d94e01a2ced000f39 (patch) | |
| tree | bf9f35cf9cc80551b6f49748aed6d7fc7da3c43f | |
| parent | 2bd23530d83c09add1d4fd36cdea77f7d3746504 (diff) | |
| download | php-git-f3aca8bc4dd2556bb1db476d94e01a2ced000f39.tar.gz | |
Fixed php-5.2 support
| -rw-r--r-- | ext/opcache/zend_accelerator_blacklist.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/opcache/zend_accelerator_blacklist.c b/ext/opcache/zend_accelerator_blacklist.c index b11d41e1ec..da83cfd311 100644 --- a/ext/opcache/zend_accelerator_blacklist.c +++ b/ext/opcache/zend_accelerator_blacklist.c @@ -30,6 +30,10 @@ # include "main/php_regex.h" #endif +#if ZEND_EXTENSION_API_NO < PHP_5_3_X_API_NO +# include "ext/standard/php_string.h" +#endif + #ifdef ZEND_WIN32 # define REGEX_MODE (REG_EXTENDED|REG_NOSUB|REG_ICASE) #else @@ -252,7 +256,11 @@ void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename) zend_accel_error(ACCEL_LOG_DEBUG,"Loading blacklist file: '%s'", filename); if (VCWD_REALPATH(filename, buf)) { +#if ZEND_EXTENSION_API_NO < PHP_5_3_X_API_NO + blacklist_path_length = php_dirname(buf, strlen(buf)); +#else blacklist_path_length = zend_dirname(buf, strlen(buf)); +#endif blacklist_path = zend_strndup(buf, blacklist_path_length); } |
