C 错误:'__s1#len和x27;未声明(首次在此函数中使用)

C 错误:'__s1#len和x27;未声明(首次在此函数中使用),c,gcc,C,Gcc,我正在尝试编译一个非常旧的PHP版本,但遇到以下错误: /tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected ';' before '__s1_len' /tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: '__s1_len' undeclared (first use in this function) /tmp/php-5.0.5/ext/openssl/openssl

我正在尝试编译一个非常旧的PHP版本,但遇到以下错误:

/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected ';' before '__s1_len'
/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: '__s1_len' undeclared (first use in this function)
/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: '__s2_len' undeclared (first use in this function)
/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected expression before 'const'
/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected expression before 'const'
/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected expression before 'const'
/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected expression before 'const'
/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected expression before 'const'
/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected expression before 'const'
/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected expression before 'const'
/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected expression before 'const'
/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected expression before 'const'
/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected expression before 'const'
/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected expression before 'const'
/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected expression before 'const'
这是3198行:

match = strcmp(cnmatch, buf) == 0;
我觉得那条线不错吧?我也看不到文件中的任何地方。不在3198号线上或任何其他线上


有什么想法吗?

看起来宏正在某处使用。。。无论是在线的还是上面的某个地方,你都不会用新的OpenSSL编译真正的旧版本的PHP,除非你做一些重大的黑客攻击。从一个已经尝试了三个月却没有成功的人那里得到。只需使用PHP7或禁用SSL。@JL2210-我是针对较旧版本的OpenSSL进行编译的:我已经让PHP4.4使用较旧版本的OpenSSL进行编译,但由于我不清楚的原因,它仍然是针对OpenSSL 1.0.0进行链接的:@neubert请查看我的答案