Skip to content

Commit

Permalink
Expand the ZEND_STRL macro to handle platforms where strncmp() is a m…
Browse files Browse the repository at this point in the history
…acro.

On most platforms, this works fine, but on Linux armhf, strncmp() is a macro
rather than a real function, ergo the macro expansion of ZEND_STRL doesn't
occur until after the compiler knows it needs three parameters for strncmp()
and we get a compile error.

Fixes the fix for bug #61697.
  • Loading branch information
LawnGnome committed Jul 23, 2013
1 parent f00d796 commit f9000fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/spl/php_spl.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ PHP_FUNCTION(spl_autoload_functions)
add_next_index_string(tmp, alfi->func_ptr->common.function_name, 1);
add_next_index_zval(return_value, tmp);
} else {
if (strncmp(alfi->func_ptr->common.function_name, ZEND_STRL("__lambda_func"))) {
if (strncmp(alfi->func_ptr->common.function_name, "__lambda_func", sizeof("__lambda_func") - 1)) {
add_next_index_string(return_value, alfi->func_ptr->common.function_name, 1);
} else {
char *key;
Expand Down

0 comments on commit f9000fd

Please sign in to comment.