星罗

导航

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/srclib‘ make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/local/directadmin/custombuild/libiconv-1.14/srclib‘ make: *** [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

posted on 2016-05-31 10:55  星罗  阅读(906)  评论(0编辑  收藏  举报