Author: ludo
Date: Thu Apr 28 21:22:24 2011
New Revision: 27046
URL: https://svn.nixos.org/websvn/nix/?rev=27046&sc=1

Log:
Elinks: Fix libgc initialization.

Added:
   nixpkgs/trunk/pkgs/applications/networking/browsers/elinks/gc-init.patch
Modified:
   nixpkgs/trunk/pkgs/applications/networking/browsers/elinks/default.nix

Modified: nixpkgs/trunk/pkgs/applications/networking/browsers/elinks/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/applications/networking/browsers/elinks/default.nix      
Thu Apr 28 20:58:27 2011        (r27045)
+++ nixpkgs/trunk/pkgs/applications/networking/browsers/elinks/default.nix      
Thu Apr 28 21:22:24 2011        (r27046)
@@ -9,8 +9,10 @@
     sha256 = "1li4vlbq8wvnigxlkzb15490y90jg6y9yzzrqpqcz2h965w5869d";
   };
 
+  patches = [ ./gc-init.patch ];
+
   buildInputs = [ python perl ncurses x11 bzip2 zlib openssl spidermonkey 
guile gpm ];
-  
+
   configureFlags =
     ''
       --enable-finger --enable-html-highlight --with-guile

Added: nixpkgs/trunk/pkgs/applications/networking/browsers/elinks/gc-init.patch
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/applications/networking/browsers/elinks/gc-init.patch    
Thu Apr 28 21:22:24 2011        (r27046)
@@ -0,0 +1,17 @@
+Fix libgc initialization in the presence of Guile 2.0.
+
+--- elinks-0.12pre5/src/main/main.c    2009-07-07 14:23:17.000000000 +0200
++++ elinks-0.12pre5/src/main/main.c    2011-04-28 23:20:15.000000000 +0200
+@@ -339,6 +339,11 @@ int
+ main(int argc, char *argv[])
+ {
+ #ifdef CONFIG_GC
++      /* Guile 2.x uses libgc too and it initializes it this way, so we
++       * must make sure to initialize it the same way, or it will just
++       * segfault.  */
++      GC_all_interior_pointers = 0;
++
+       GC_INIT();
+       GC_set_warn_proc(gc_warning);
+ #endif
+
_______________________________________________
nix-commits mailing list
nix-comm...@cs.uu.nl
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to