Skip to content

Commit 7ff28d3

Browse files
committed
Update msgpack.c。貌似缺少一个头文件引入的判断
我们买了SAE的MAE,发现他们的PHP定制过,修改了PHP的Session模块。导致MsgPack编译会报错: msgpack-0.5.5/msgpack.c:11:79: error: ext/session/php_session.h: No such file or directory 我们查看了msgpack.c的源码,发现所有用到session的地方鸟哥都加了#if HAVE_PHP_SESSION,唯有include头文件的时候没有加。 所以我们加上了这个判断。不知理解是否正确?
1 parent 2eba69a commit 7ff28d3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

msgpack.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
#include "ext/standard/info.h" /* for php_info */
99
#include "ext/standard/php_incomplete_class.h" /* for incomplete_class */
1010
#include "ext/standard/php_var.h" /* for PHP_VAR_SERIALIZE */
11+
12+
#if HAVE_PHP_SESSION
1113
#include "ext/session/php_session.h" /* for php_session_register_serializer */
14+
#endif
1215

1316
#include "php_msgpack.h"
1417
#include "msgpack_pack.h"

0 commit comments

Comments
 (0)