Subject: Re: emacs -nv fails on glib 2.31

From: Olivier Blin <[email-masked]>
Date: Fri, 11 Nov 2011 13:32:08 +0100

Attached is the patch I added in Mageia to fix this bug.
Something similar should be done in the emacs-23 branch.

diff -up emacs-23.3/src/xgselect.c.xgselect_init emacs-23.3/src/xgselect.c
--- emacs-23.3/src/xgselect.c.xgselect_init	2011-01-08 18:45:14.000000000 +0100
+++ emacs-23.3/src/xgselect.c	2011-11-11 13:00:53.211765255 +0100
@@ -55,6 +55,9 @@ xg_select (max_fds, rfds, wfds, efds, ti
   do {
     if (n_gfds > gfds_size) 
       {
+        if (gfds_size == 0)
+          xgselect_initialize ();
+
         while (n_gfds > gfds_size) 
           gfds_size *= 2;
         xfree (gfds);
-- 
Olivier Blin - blino