File emacs-24.1-xgselect.patch of Package emacs

--- src/xgselect.c
+++ src/xgselect.c	2012-06-27 11:58:47.756081195 +0000
@@ -58,7 +58,12 @@ xg_select (int max_fds, SELECT_TYPE *rfd
 	gfds = xpalloc (0, &gfds_size, n_gfds - gfds_size, INT_MAX,
 			sizeof *gfds);
       }
-
+    else if (!gfds)
+      {
+	gfds_size = 1;
+	gfds = xmalloc (sizeof (*gfds));
+      }
+    
     n_gfds = g_main_context_query (context,
                                    G_PRIORITY_LOW,
                                    &tmo_in_millisec,
openSUSE Build Service is sponsored by