]> git.webhop.me Git - bs-cst-neutrino-hd.git/commitdiff
libiconv: add patch for newer compiler
authorMarkham <markham001@gmx.de>
Thu, 12 Nov 2015 19:43:54 +0000 (20:43 +0100)
committerMarkham <markham001@gmx.de>
Thu, 12 Nov 2015 19:43:54 +0000 (20:43 +0100)
archive-patches/libiconv-1-fixes.patch [new file with mode: 0644]
make/libraries.mk

diff --git a/archive-patches/libiconv-1-fixes.patch b/archive-patches/libiconv-1-fixes.patch
new file mode 100644 (file)
index 0000000..23572c5
--- /dev/null
@@ -0,0 +1,40 @@
+From 47345f5dcfb91da8afed7c4e6c29faa2056db447 Mon Sep 17 00:00:00 2001
+From: MXE
+Date: Fri, 7 Jun 2013 17:44:24 +1000
+Subject: [PATCH] remove gets since c++11 removed it
+ https://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00186.html
+
+
+diff --git a/srclib/stdio.in.h b/srclib/stdio.in.h
+index 473c84c..dfb59eb 100644
+--- a/srclib/stdio.in.h
++++ b/srclib/stdio.in.h
+@@ -679,22 +679,11 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
+ # endif
+ #endif
+-#if @GNULIB_GETS@
+-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-#   undef gets
+-#   define gets rpl_gets
+-#  endif
+-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
+-_GL_CXXALIAS_RPL (gets, char *, (char *s));
+-# else
+-_GL_CXXALIAS_SYS (gets, char *, (char *s));
+-#  undef gets
+-# endif
+-_GL_CXXALIASWARN (gets);
+ /* 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.  */
++   so any use of gets warrants an unconditional warning; besides, C11
++   removed it.  */
++#undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
+-- 
+1.8.2.3
index 3a7a05d1bb285b305c4e5b61aaf655ab449adb4d..53b76c501dc55b5ab0c10a7fa7b44bc075e8a9e6 100755 (executable)
@@ -510,6 +510,7 @@ $(D)/openthreads: | $(TARGETPREFIX)
 $(D)/libiconv: $(ARCHIVE)/libiconv-1.14.tar.gz | $(TARGETPREFIX)
        $(UNTAR)/libiconv-1.14.tar.gz
        pushd $(BUILD_TMP)/libiconv-1.14 && \
+               $(PATCH)/libiconv-1-fixes.patch && \
                $(CONFIGURE) --build=$(BUILD) --host=$(TARGET) --target=$(TARGET) --prefix= --datarootdir=/.remove && \
                $(MAKE) && \
                $(MAKE) install DESTDIR=$(TARGETPREFIX)