diff --git a/0001-Use-gcd-from-boost-math-gcd.patch b/0001-Use-gcd-from-boost-math-gcd.patch new file mode 100644 index 0000000..c82f864 --- /dev/null +++ b/0001-Use-gcd-from-boost-math-gcd.patch @@ -0,0 +1,44 @@ +From 9f68be99919871283238e4a12940d9581d724af2 Mon Sep 17 00:00:00 2001 +From: David Ostrovsky +Date: Thu, 4 May 2017 19:14:13 +0200 +Subject: [PATCH] Use gcd from boost::math::gcd + +According to the documentation "Run-time GCD & LCM Determination": [1], +gcd should be consumed from boost::math::gcd. + +[1] + +Change-Id: I026a4e8ead75399765eb73fa5434a57958676383 +Reviewed-on: https://gerrit.libreoffice.org/37260 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +--- + tools/source/generic/fract.cxx | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx +index bc9bef467e86..afcb2e60ba42 100644 +--- a/tools/source/generic/fract.cxx ++++ b/tools/source/generic/fract.cxx +@@ -30,6 +30,7 @@ + #include + #include + ++#include + #include + + template +@@ -180,8 +181,8 @@ namespace + T den = r.denominator(); + + // Avoid overflow and preserve normalization +- T gcd1 = boost::integer::gcd(i.numerator(), den); +- T gcd2 = boost::integer::gcd(num, i.denominator()); ++ T gcd1 = boost::math::gcd(i.numerator(), den); ++ T gcd2 = boost::math::gcd(num, i.denominator()); + + bool fail = false; + fail |= o3tl::checked_multiply(i.numerator() / gcd1, num / gcd2, num); +-- +2.12.2 + diff --git a/libreoffice.spec b/libreoffice.spec index d801dfd..cf6ef02 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -246,6 +246,7 @@ Patch4: 0001-Related-tdf-106100-recover-mangled-svg-in-presentati.patch Patch5: 0001-Resolves-rhbz-1432468-disable-opencl-by-default.patch Patch6: 0001-apparently-the-executable-does-not-need-pdfium-direc.patch Patch7: 0001-add-missing-dep-on-dir.patch +Patch8: 0001-Use-gcd-from-boost-math-gcd.patch %if 0%{?rhel} # not upstreamed