Elinks: Fix libgc initialization.

svn path=/nixpkgs/trunk/; revision=27046

+20 -1
+3 -1
pkgs/applications/networking/browsers/elinks/default.nix
··· 9 9 sha256 = "1li4vlbq8wvnigxlkzb15490y90jg6y9yzzrqpqcz2h965w5869d"; 10 10 }; 11 11 12 + patches = [ ./gc-init.patch ]; 13 + 12 14 buildInputs = [ python perl ncurses x11 bzip2 zlib openssl spidermonkey guile gpm ]; 13 - 15 + 14 16 configureFlags = 15 17 '' 16 18 --enable-finger --enable-html-highlight --with-guile
+17
pkgs/applications/networking/browsers/elinks/gc-init.patch
··· 1 + Fix libgc initialization in the presence of Guile 2.0. 2 + 3 + --- elinks-0.12pre5/src/main/main.c 2009-07-07 14:23:17.000000000 +0200 4 + +++ elinks-0.12pre5/src/main/main.c 2011-04-28 23:20:15.000000000 +0200 5 + @@ -339,6 +339,11 @@ int 6 + main(int argc, char *argv[]) 7 + { 8 + #ifdef CONFIG_GC 9 + + /* Guile 2.x uses libgc too and it initializes it this way, so we 10 + + * must make sure to initialize it the same way, or it will just 11 + + * segfault. */ 12 + + GC_all_interior_pointers = 0; 13 + + 14 + GC_INIT(); 15 + GC_set_warn_proc(gc_warning); 16 + #endif 17 +