码迷,mamicode.com
首页 > 其他好文 > 详细

iconv 编译不通过问题

时间:2014-09-28 15:50:22      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:style   http   io   ar   for   sp   div   问题   on   

升级Debian到wheezy后重新编译php。在编译libiconv时出错(话说俺居然没有找到这货的二进制包 bubuko.com,布布扣 )

./stdio.h:1010:1: error: ‘gets‘ undeclared here (not in a function)

下面报

make[2]: *** [progname.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/opt/sources/libiconv-1.14/srclib‘
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/sources/libiconv-1.14/srclib‘
make: *** [all] Error 2

Google搜了好久终于找到一篇文章《libiconv gets undeclared》真是雪中送炭啊。

wget -c http://www.itkb.ro/userfiles/file/libiconv-glibc-2.16.patch.gz
cd libiconv-1.14/srclib
patch -p1 stdio.in.h

俺运行patch后好久都没有反应 bubuko.com,布布扣 最后人肉修改

这个补丁的内容如下

--- srclib/stdio.in.h.orig      2011-08-07 16:42:06.000000000 +0300
+++ srclib/stdio.in.h   2013-01-10 15:53:03.000000000 +0200
@@ -695,7 +695,9 @@
 /* It is very rare that the developer ever has full control of stdin,
    so any use of gets warrants an unconditional warning.  Assume it is
    always declared, since it is required by C89.  */
-_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

iconv 编译不通过问题

标签:style   http   io   ar   for   sp   div   问题   on   

原文地址:http://www.cnblogs.com/fall-in-love/p/3998156.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!