lol

Merge pull request #29159 from timor/coin3d-sbhashentry-fix

coin3d: include fix for newer compilers

authored by

Jörg Thalheim and committed by
GitHub
c3887f02 27a4820c

+28
+3
pkgs/development/libraries/coin3d/default.nix
··· 16 16 sha256 = "076dyc52swk8qc7ylps53fg6iqmd52x8s7m18i80x49dd109yw20"; 17 17 }) 18 18 ./gcc-4.8.patch # taken from FC-17 source rpm 19 + # see https://bitbucket.org/Coin3D/coin/issues/128/crash-in-cc_memalloc_deallocate 20 + # patch adapted from https://bitbucket.org/Coin3D/coin/pull-requests/75/added-fix-for-issue-128-provided-by-fedora/diff 21 + ./sbhashentry.patch 19 22 ]; 20 23 21 24 buildInputs = [ mesa ];
+25
pkgs/development/libraries/coin3d/sbhashentry.patch
··· 1 + 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 2 + --- a/src/misc/SbHash.h 3 + +++ b/src/misc/SbHash.h 4 + @@ -88,8 +88,8 @@ 5 + SbHashEntry<Type, Key> * entry = static_cast<SbHashEntry<Type, Key> *>( ptr); 6 + cc_memalloc_deallocate(entry->memhandler, ptr); 7 + } 8 + - SbHashEntry(const Key & key, const Type & obj) : key(key), obj(obj) {} 9 + - 10 + + SbHashEntry(const Key & key, const Type & obj, cc_memalloc *memhandler) 11 + + : key(key), obj(obj), memhandler(memhandler) {} 12 + Key key; 13 + Type obj; 14 + SbHashEntry<Type, Key> * next; 15 + @@ -218,7 +218,7 @@ 16 + /* Key not already in the hash table; insert a new 17 + * entry as the first element in the bucket 18 + */ 19 + - entry = new (this->memhandler) SbHashEntry<Type, Key>(key, obj); 20 + + entry = new (this->memhandler) SbHashEntry<Type, Key>(key, obj, this->memhandler); 21 + entry->next = this->buckets[i]; 22 + this->buckets[i] = entry; 23 + 24 + 25 + Diff finished. Sat Sep 9 19:50:32 2017