diff options
author | timor <timor.dd@googlemail.com> | 2017-09-09 20:18:35 +0200 |
---|---|---|
committer | timor <timor.dd@googlemail.com> | 2017-09-09 20:29:52 +0200 |
commit | cf32537210014b55b69c2ad1f62db91b3a3ff000 (patch) | |
tree | 36fa52f81829abd986453ffea8c97d115e9eaf7a /pkgs/development/libraries/coin3d | |
parent | e960eb0bf579b1e5afc58a207539d46bf21b7416 (diff) | |
download | nixpkgs-cf32537210014b55b69c2ad1f62db91b3a3ff000.tar nixpkgs-cf32537210014b55b69c2ad1f62db91b3a3ff000.tar.gz nixpkgs-cf32537210014b55b69c2ad1f62db91b3a3ff000.tar.bz2 nixpkgs-cf32537210014b55b69c2ad1f62db91b3a3ff000.tar.lz nixpkgs-cf32537210014b55b69c2ad1f62db91b3a3ff000.tar.xz nixpkgs-cf32537210014b55b69c2ad1f62db91b3a3ff000.tar.zst nixpkgs-cf32537210014b55b69c2ad1f62db91b3a3ff000.zip |
coin3d: include fix for newer compilers
This manifests as a segfault in any applications that use the library.
Diffstat (limited to 'pkgs/development/libraries/coin3d')
-rw-r--r-- | pkgs/development/libraries/coin3d/default.nix | 3 | ||||
-rw-r--r-- | pkgs/development/libraries/coin3d/sbhashentry.patch | 25 |
2 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/development/libraries/coin3d/default.nix b/pkgs/development/libraries/coin3d/default.nix index 034d7d658e1..ce78a6fc134 100644 --- a/pkgs/development/libraries/coin3d/default.nix +++ b/pkgs/development/libraries/coin3d/default.nix @@ -16,6 +16,9 @@ stdenv.mkDerivation rec { sha256 = "076dyc52swk8qc7ylps53fg6iqmd52x8s7m18i80x49dd109yw20"; }) ./gcc-4.8.patch # taken from FC-17 source rpm + # see https://bitbucket.org/Coin3D/coin/issues/128/crash-in-cc_memalloc_deallocate + # patch adapted from https://bitbucket.org/Coin3D/coin/pull-requests/75/added-fix-for-issue-128-provided-by-fedora/diff + ./sbhashentry.patch ]; buildInputs = [ mesa ]; diff --git a/pkgs/development/libraries/coin3d/sbhashentry.patch b/pkgs/development/libraries/coin3d/sbhashentry.patch new file mode 100644 index 00000000000..88c9a5f02a2 --- /dev/null +++ b/pkgs/development/libraries/coin3d/sbhashentry.patch @@ -0,0 +1,25 @@ +diff -u --label /tmp/Coin-3.1.3/src/misc/SbHash.h --label \#\<buffer\ SbHash.h\> /tmp/Coin-3.1.3/src/misc/SbHash.h /tmp/buffer-content-21756V0 +--- a/src/misc/SbHash.h ++++ b/src/misc/SbHash.h +@@ -88,8 +88,8 @@ + SbHashEntry<Type, Key> * entry = static_cast<SbHashEntry<Type, Key> *>( ptr); + 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; + SbHashEntry<Type, Key> * next; +@@ -218,7 +218,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; + + +Diff finished. Sat Sep 9 19:50:32 2017 |