From 18a8ecb1183f9304dc306a3d83a8c0eb42c88123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 25 Aug 2016 10:25:04 +0200 Subject: [PATCH] libreoffice: fix one build error with later gcc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- .../files/0002-fix-gcc-build-error.patch | 42 +++++++++++++++++++ .../libreoffice/libreoffice.inc | 1 + 2 files changed, 43 insertions(+) create mode 100644 recipes-libreoffice/libreoffice/files/0002-fix-gcc-build-error.patch diff --git a/recipes-libreoffice/libreoffice/files/0002-fix-gcc-build-error.patch b/recipes-libreoffice/libreoffice/files/0002-fix-gcc-build-error.patch new file mode 100644 index 0000000..914594d --- /dev/null +++ b/recipes-libreoffice/libreoffice/files/0002-fix-gcc-build-error.patch @@ -0,0 +1,42 @@ +From b9fa2963cf12e6987b3a0acc219c4fa591e41be8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Wed, 3 Feb 2016 10:30:43 +0000 +Subject: [PATCH] fix gcc build error + +error: invalid operands of types '__gnu_cxx::__enable_if::__type +{aka double}' and 'int' to binary 'operator%' + +apparently there's a template returning double for abs for the +non-int/long/float/double argument case. So promote earlier to int so the +abs is called + +Change-Id: I882a27c5ec349f894c1c9f4857687360a46b55ae +--- + sax/source/tools/converter.cxx | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx +index 744415e..cf061c9 100644 +--- a/sax/source/tools/converter.cxx ++++ b/sax/source/tools/converter.cxx +@@ -1250,7 +1250,7 @@ bool Converter::convertDuration(util::Duration& rDuration, + + + static void +-lcl_AppendTimezone(OUStringBuffer & i_rBuffer, sal_Int16 const nOffset) ++lcl_AppendTimezone(OUStringBuffer & i_rBuffer, int const nOffset) + { + if (0 == nOffset) + { +@@ -1435,7 +1435,7 @@ lcl_MaxDaysPerMonth(const sal_Int32 nMonth, const sal_Int32 nYear) + static void lcl_ConvertToUTC( + sal_Int16 & o_rYear, sal_uInt16 & o_rMonth, sal_uInt16 & o_rDay, + sal_uInt16 & o_rHours, sal_uInt16 & o_rMinutes, +- sal_Int16 const nSourceOffset) ++ int const nSourceOffset) + { + sal_Int16 nOffsetHours(abs(nSourceOffset) / 60); + sal_Int16 const nOffsetMinutes(abs(nSourceOffset) % 60); +-- +2.7.4 + diff --git a/recipes-libreoffice/libreoffice/libreoffice.inc b/recipes-libreoffice/libreoffice/libreoffice.inc index fb5705d..d22aea8 100644 --- a/recipes-libreoffice/libreoffice/libreoffice.inc +++ b/recipes-libreoffice/libreoffice/libreoffice.inc @@ -10,6 +10,7 @@ require libreoffice-version.inc SRC_URI += " \ file://0001-update-ax_boost-scripts-to-fix-configure-with-system.patch \ + file://0002-fix-gcc-build-error.patch \ " inherit autotools-brokensep pkgconfig distutils-base perlnative