diff options
author | Tony Theodore <tonyt@logyst.com> | 2013-06-07 07:52:20 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2013-06-09 16:32:53 (GMT) |
commit | 7e231efd245996b886b501dad780761205ecf376 (patch) | |
tree | e0987dff4a2dafa80aa7f1ae3c8c5966fd64233f | |
parent | 496be8fd65255b248f382252c7a51df983346a3f (diff) | |
download | mxe-7e231efd245996b886b501dad780761205ecf376.zip mxe-7e231efd245996b886b501dad780761205ecf376.tar.gz mxe-7e231efd245996b886b501dad780761205ecf376.tar.bz2 |
packages libiconv glib: fix for removed gets() and apply patches in glib build
-rw-r--r-- | src/glib.mk | 2 | ||||
-rw-r--r-- | src/libiconv-1-fixes.patch | 46 |
2 files changed, 48 insertions, 0 deletions
diff --git a/src/glib.mk b/src/glib.mk index e3aaabe..fb748c2 100644 --- a/src/glib.mk +++ b/src/glib.mk @@ -23,6 +23,8 @@ define $(PKG)_BUILD # native build of libiconv (used by glib-genmarshal) cd '$(1).native' && $(call UNPACK_PKG_ARCHIVE,libiconv) + $(foreach PKG_PATCH,$(sort $(wildcard $(TOP_DIR)/src/libiconv-*.patch)), + (cd '$(1).native/$(libiconv_SUBDIR)' && $(PATCH) -p1 -u) < $(PKG_PATCH)) cd '$(1).native/$(libiconv_SUBDIR)' && ./configure \ --disable-shared \ --disable-nls diff --git a/src/libiconv-1-fixes.patch b/src/libiconv-1-fixes.patch new file mode 100644 index 0000000..cf3fef5 --- /dev/null +++ b/src/libiconv-1-fixes.patch @@ -0,0 +1,46 @@ +This file is part of MXE. +See index.html for further information. + +Contains ad hoc patches for cross building. + +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 + |