kumquat-buildroot/package/harfbuzz/0003-GSUB-Fix-build-on-GCC-7.patch
Fabrice Fontaine 5a73e4cca9 package/harfbuzz: fix build with gcc < 7
Fix the following build failure with gcc < 7 raised since bump to
version 4.4.0 in commit e186b4d89d:

In file included from ../src/hb.hh:473:0,
                 from ../src/hb-buffer-verify.cc:27:
../src/hb-cplusplus.hh:170:13: error: specialization of 'template<class _Tp> struct std::hash' in different namespace [-fpermissive]
 struct std::hash<hb::shared_ptr<T>>
             ^

Fixes:
 - http://autobuild.buildroot.org/results/3fe7526b685368007ae0f66e15ef2b27d30d5063

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-07-20 13:46:36 +02:00

57 lines
1.5 KiB
Diff

From 79eb0f74860fb6309e3162b4f17f98481c05a318 Mon Sep 17 00:00:00 2001
From: Kleis Auke Wolthuizen <github@kleisauke.nl>
Date: Wed, 6 Jul 2022 13:29:55 +0200
Subject: [PATCH] [GSUB] Fix build on GCC < 7
[Retrieved (and backported) from:
https://github.com/harfbuzz/harfbuzz/commit/79eb0f74860fb6309e3162b4f17f98481c05a318]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
src/OT/Layout/GSUB/GSUB.hh | 5 +++--
src/hb-ot-layout-gsub-table.hh | 8 ++++----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/OT/Layout/GSUB/GSUB.hh b/src/OT/Layout/GSUB/GSUB.hh
index 372862e2bb..750dca1da3 100644
--- a/src/OT/Layout/GSUB/GSUB.hh
+++ b/src/OT/Layout/GSUB/GSUB.hh
@@ -5,9 +5,10 @@
#include "Common.hh"
#include "SubstLookup.hh"
-using OT::Layout::GSUB::SubstLookup;
-
namespace OT {
+
+using Layout::GSUB::SubstLookup;
+
namespace Layout {
/*
diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
index 1eca613b6a..50301ff1d9 100644
--- a/src/hb-ot-layout-gsub-table.hh
+++ b/src/hb-ot-layout-gsub-table.hh
@@ -32,9 +32,8 @@
#include "OT/Layout/GSUB/GSUB.hh"
namespace OT {
-
-using Layout::GSUB::SubstLookup;
-using Layout::GSUB::ExtensionSubst;
+namespace Layout {
+namespace GSUB {
// TODO(garretrieger): Move into the new layout directory.
/* Out-of-class implementation for methods recursing */
@@ -82,7 +81,8 @@ inline bool SubstLookup::dispatch_recurse_func<hb_ot_apply_context_t> (hb_ot_app
}
#endif
-
+} /* namespace GSUB */
+} /* namespace Layout */
} /* namespace OT */