Skip to contentSkip to conversation

osb-jscore: Templates cannot be static

PATCH New Ulf Samuelsson 1 participant 1 message Mar 12, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 osb-jscore: Templates cannot be static

Some templates are declared static inline, which makes the compiler complain.
This patch removes two static declarations in "JavaScriptCore/kjs/protected_values.cpp" allowing the build to complete successfully.

---
 .../gtk-webcore/files/no-static-templates.patch    |   21 ++++++++++++++++++++
 recipes/gtk-webcore/osb-jscore_svn.bb              |    4 ++-
 2 files changed, 24 insertions(+), 1 deletions(-)
 create mode 100644 recipes/gtk-webcore/files/no-static-templates.patch
recipes/gtk-webcore/files/no-static-templates.patch new file +21 -0
new file mode 100644
index 0000000..2cfb41f
@@ -0,0 +1,21 @@
+diff -urN JavaScriptCore-0rig/kjs/protected_values.cpp JavaScriptCore/kjs/protected_values.cpp
+--- JavaScriptCore-0rig/kjs/protected_values.cpp	2010-02-26 12:57:50.000000000 +0100
++++ JavaScriptCore/kjs/protected_values.cpp	2010-02-26 12:59:13.000000000 +0100
+@@ -195,7 +195,7 @@
+ 
+ template <int size> static unsigned hash(ValueImp *pointer);
+ 
+-template <> static inline unsigned hash<4>(ValueImp *pointer) 
++template <> inline unsigned hash<4>(ValueImp *pointer)
+ {
+   int a = (int)(intptr_t)PHI;
+   int b = (int)(intptr_t)pointer;
+@@ -214,7 +214,7 @@
+   return (unsigned)c;
+ }
+ 
+-template <> static inline unsigned hash<8>(ValueImp *pointer)
++template <> inline unsigned hash<8>(ValueImp *pointer)
+ {
+   int a = (int)PHI;
+   int b = (int)(intptr_t)pointer;
recipes/gtk-webcore/osb-jscore_svn.bb +3 -1
index 52c56f9..b8c6ee2 100644
@@ -7,7 +7,9 @@ PV = "0.5.2+svnr${SRCPV}"
 PR = "r1"
 
 SRC_URI = "svn://gtk-webcore.svn.sourceforge.net/svnroot/gtk-webcore/trunk;module=JavaScriptCore;proto=https \
-           file://gcc4-fno-threadsafe-statics-JavaScriptCore.patch;patch=1"
+           file://gcc4-fno-threadsafe-statics-JavaScriptCore.patch;patch=1 \
+	   file://no-static-templates.patch;patch=1 \
+	"
 
 S = "${WORKDIR}/JavaScriptCore"
 
Signature · 1 line
1.6.0.2