summaryrefslogtreecommitdiff
path: root/extra/gtkmathview/0005-gcc-4.7-build-fixes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/gtkmathview/0005-gcc-4.7-build-fixes.patch')
-rw-r--r--extra/gtkmathview/0005-gcc-4.7-build-fixes.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/extra/gtkmathview/0005-gcc-4.7-build-fixes.patch b/extra/gtkmathview/0005-gcc-4.7-build-fixes.patch
new file mode 100644
index 000000000..bae680af3
--- /dev/null
+++ b/extra/gtkmathview/0005-gcc-4.7-build-fixes.patch
@@ -0,0 +1,57 @@
+Index: b/src/frontend/common/TemplateBuilder.hh
+===================================================================
+--- a/src/frontend/common/TemplateBuilder.hh
++++ b/src/frontend/common/TemplateBuilder.hh
+@@ -47,12 +47,12 @@
+ SmartPtr<typename ElementBuilder::type>
+ getElement(const typename Model::Element& el) const
+ {
+- if (SmartPtr<typename ElementBuilder::type> elem = smart_cast<typename ElementBuilder::type>(linkerAssoc(el)))
++ if (SmartPtr<typename ElementBuilder::type> elem = smart_cast<typename ElementBuilder::type>(this->linkerAssoc(el)))
+ return elem;
+ else
+ {
+- SmartPtr<typename ElementBuilder::type> elem = ElementBuilder::type::create(ElementBuilder::getContext(*this));
+- linkerAdd(el, elem);
++ elem = ElementBuilder::type::create(ElementBuilder::getContext(*this));
++ this->linkerAdd(el, elem);
+ return elem;
+ }
+ }
+Index: b/src/frontend/common/TemplateElementIterator.hh
+===================================================================
+--- a/src/frontend/common/TemplateElementIterator.hh
++++ b/src/frontend/common/TemplateElementIterator.hh
+@@ -43,7 +43,7 @@
+ findValidNodeForward(const typename Model::Node& p0) const
+ {
+ for (typename Model::Node p = p0; p; p = Model::getNextSibling(p))
+- if (valid(p)) return Model::asElement(p);
++ if (this->valid(p)) return Model::asElement(p);
+ return typename Model::Element();
+ }
+
+Index: b/mathmlsvg/main.cc
+===================================================================
+--- a/mathmlsvg/main.cc
++++ b/mathmlsvg/main.cc
+@@ -18,6 +18,7 @@
+
+ #include <config.h>
+
++#include <unistd.h>
+ #include <cassert>
+ #include <cstring>
+ #include <fstream>
+Index: b/mathmlps/main.cc
+===================================================================
+--- a/mathmlps/main.cc
++++ b/mathmlps/main.cc
+@@ -18,6 +18,7 @@
+
+ #include <config.h>
+
++#include <unistd.h>
+ #include <cassert>
+ #include <cstring>
+ #include <fstream>