summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2017-09-07 11:10:07 +0200
committerRobby Workman <rworkman@slackbuilds.org>2021-04-17 22:51:41 -0500
commit91c18590ae5cc1394625cf388700fafd67a12e8e (patch)
tree2f6e92296d0547011a16415690a34f21fd60441f
parent25c5bf1b0a39e51e5c1e0417653a6776fc5c6145 (diff)
downloadslackbuilds-91c18590ae5cc1394625cf388700fafd67a12e8e.tar.gz
development/Coin: Patch to fix FreeCAD segfault at startup.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--development/Coin/Coin.SlackBuild3
-rw-r--r--development/Coin/memhandler-initialization.patch20
2 files changed, 23 insertions, 0 deletions
diff --git a/development/Coin/Coin.SlackBuild b/development/Coin/Coin.SlackBuild
index 96953fa909..eb99408893 100644
--- a/development/Coin/Coin.SlackBuild
+++ b/development/Coin/Coin.SlackBuild
@@ -61,6 +61,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Thanks Fedora
+patch -p1 < $CWD/memhandler-initialization.patch
+
# Thanks Debian
patch -p1 < $CWD/coin-include_and_js.patch
diff --git a/development/Coin/memhandler-initialization.patch b/development/Coin/memhandler-initialization.patch
new file mode 100644
index 0000000000..4c346487ed
--- /dev/null
+++ b/development/Coin/memhandler-initialization.patch
@@ -0,0 +1,20 @@
+--- Coin-3.1.3/src/misc/SbHash.h.init 2010-03-02 22:20:09.000000000 +0900
++++ Coin-3.1.3/src/misc/SbHash.h 2016-04-22 16:52:39.888883757 +0900
+@@ -89,6 +89,8 @@
+ cc_memalloc_deallocate(entry->memhandler, ptr);
+ }
+ SbHashEntry(const Key & key, const Type & obj) : key(key), obj(obj) {}
++ SbHashEntry(const Key & key, const Type & obj, cc_memalloc *memhandler)
++ : key(key), obj(obj), memhandler(memhandler) {}
+
+ Key key;
+ Type obj;
+@@ -218,7 +220,7 @@
+ /* Key not already in the hash table; insert a new
+ * entry as the first element in the bucket
+ */
+- entry = new (this->memhandler) SbHashEntry<Type, Key>(key, obj);
++ entry = new (this->memhandler) SbHashEntry<Type, Key>(key, obj, this->memhandler);
+ entry->next = this->buckets[i];
+ this->buckets[i] = entry;
+