-
-
Save merqlove/eda0bd9511fce0d319e6efb152f8c68d to your computer and use it in GitHub Desktop.
Install libiconv on Ubuntu 14.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
cd /tmp | |
wget -q https://ftp.gnu.org/gnu/libiconv/libiconv-1.14.tar.gz && \ | |
tar -xzf ./libiconv-1.14.tar.gz | |
cd /tmp/libiconv-1.14 | |
wget -q https://gist.githubusercontent.com/merqlove/eda0bd9511fce0d319e6efb152f8c68d/raw/b8e40037af5c882b3395372093b78c42d6a7c06e/gistfile1.txt > iconv.patch && \ | |
patch -p1 -i ./iconv.patch && \ | |
sed -i -- 's/(gets/(fgets/g' ./srclib/stdio.in.h | |
./configure --prefix=/usr/local --enable-silent-rules && \ | |
make V=0 && \ | |
make V=0 install && \ | |
touch /etc/ld.so.conf.d/libiconv.conf && \ | |
echo "/usr/local/lib" > /etc/ld.so.conf.d/libiconv.conf && \ | |
ldconfig && \ | |
libtool --finish /usr/local/lib | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment