php module does not compile. Does not recognize “static function_entry”

为君一笑 提交于 2020-01-13 08:03:49

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/9688452/php-module-does-not-compile-does-not-recognize-static-function-entry

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!