php安装libiconv-1.14.tar.gz遇到的问题

php安装libiconv-1.14.tar.gz遇到的问题                                                   

遇到的Error code

In file included from progname.c:26:0: ./stdio.h:1010:1: error: gets undeclared here (not in a function) _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ^ make[2]: *** [progname.o] Error 1 make[2]: Leaving directory `/usr/local/directadmin/custombuild/libiconv-1.14/srclibmake[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/local/directadmin/custombuild/libiconv-1.14/srclibmake: *** [all] Error 2 ******************************************* ******************************************* Cannot find /usr/local/bin/php Please recompile php with custombuild, eg: cd /usr/local/directadmin/custombuild ./build all d This appears to be a 64-bit system. a common cause of http/php compile failures is mentioned here: http://help.directadmin.com/item.php?id=213 ******************************************* *******************************************

 

解决方案:                                                                              

 

cd /tmp/libiconv-1.14/srclib

vi stdio.in.h

 

找到这行内容:
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

替换成:
#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16) _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif

注意:结尾的#endif也要包括。



 

 

 

文章来自:http://www.cnblogs.com/tangshengwei/p/4828092.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3