Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php module does not compile. Does not recognize "static function_entry"

I have recently recompiled my php and suddenly old code (together with examples from the internet) stopped compiling.

This exact example does not compile.

Snippet of the problematic code:

static function_entry hello_functions[] = {
  {NULL, NULL, NULL}
};

This is the error:

/home/user/php_module/test_module/hello.c:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘hello_functions’

What could be the problem?

like image 742
Vasisualiy Avatar asked Mar 13 '12 16:03

Vasisualiy


1 Answers

Solution:
It's the difference for new php 5.4 Found the answer here

Had to replace the function_entry with static zend_function_entry

Works now.

like image 84
Vasisualiy Avatar answered Sep 18 '22 18:09

Vasisualiy