r24767 - in /desktop/experimental/glib2.0/debian: changelog patches/99_gsocket-create-socket-cloexec.patch patches/series

slomo at users.alioth.debian.org slomo at users.alioth.debian.org
Thu Jul 15 18:24:22 UTC 2010


Author: slomo
Date: Thu Jul 15 18:24:19 2010
New Revision: 24767

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=24767
Log:
debian/patches/99_gsocket-create-socket-cloexec.patch:
Patch by Julien Cristau:
Just because SOCK_CLOEXEC was defined at build time doesn't mean the
kernel we're running on supports it.  So if socket() fails with EINVAL,
try again without the flag.

Added:
    desktop/experimental/glib2.0/debian/patches/99_gsocket-create-socket-cloexec.patch
Modified:
    desktop/experimental/glib2.0/debian/changelog
    desktop/experimental/glib2.0/debian/patches/series

Modified: desktop/experimental/glib2.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/changelog?rev=24767&op=diff
==============================================================================
--- desktop/experimental/glib2.0/debian/changelog [utf-8] (original)
+++ desktop/experimental/glib2.0/debian/changelog [utf-8] Thu Jul 15 18:24:19 2010
@@ -1,3 +1,13 @@
+glib2.0 (2.25.11-3) experimental; urgency=low
+
+  * debian/patches/99_gsocket-create-socket-cloexec.patch:
+    Patch by Julien Cristau:
+    Just because SOCK_CLOEXEC was defined at build time doesn't mean the
+    kernel we're running on supports it.  So if socket() fails with EINVAL,
+    try again without the flag.
+
+ -- Sebastian Dröge <slomo at debian.org>  Thu, 15 Jul 2010 20:23:30 +0200
+
 glib2.0 (2.25.11-2) experimental; urgency=low
 
   * debian/control.in,

Added: desktop/experimental/glib2.0/debian/patches/99_gsocket-create-socket-cloexec.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/patches/99_gsocket-create-socket-cloexec.patch?rev=24767&op=file
==============================================================================
--- desktop/experimental/glib2.0/debian/patches/99_gsocket-create-socket-cloexec.patch (added)
+++ desktop/experimental/glib2.0/debian/patches/99_gsocket-create-socket-cloexec.patch [utf-8] Thu Jul 15 18:24:19 2010
@@ -1,0 +1,36 @@
+rom 9a319e5d593fd09028b14901ba7a8110921d21a0 Mon Sep 17 00:00:00 2001
+From: Julien Cristau <jcristau at debian.org>
+Date: Thu, 15 Jul 2010 15:26:02 +0100
+Subject: [PATCH] gio: don't assume that SOCK_CLOEXEC is supported whenever it's defined
+
+Just because SOCK_CLOEXEC was defined at build time doesn't mean the
+kernel we're running on supports it.  So if socket() fails with EINVAL,
+try again without the flag.
+
+Signed-off-by: Julien Cristau <jcristau at debian.org>
+---
+ gio/gsocket.c |    7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/gio/gsocket.c b/gio/gsocket.c
+index e2ba788..3879202 100644
+--- a/gio/gsocket.c
++++ b/gio/gsocket.c
+@@ -455,9 +455,12 @@ g_socket_create_socket (GSocketFamily   family,
+     }
+ 
+ #ifdef SOCK_CLOEXEC
+-  native_type |= SOCK_CLOEXEC;
++  fd = socket (family, native_type | SOCK_CLOEXEC, protocol);
++  if (fd < 0 && errno == EINVAL)
+ #endif
+-  fd = socket (family, native_type, protocol);
++  {
++    fd = socket (family, native_type, protocol);
++  }
+ 
+   if (fd < 0)
+     {
+-- 
+1.7.1
+

Modified: desktop/experimental/glib2.0/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/patches/series?rev=24767&op=diff
==============================================================================
--- desktop/experimental/glib2.0/debian/patches/series [utf-8] (original)
+++ desktop/experimental/glib2.0/debian/patches/series [utf-8] Thu Jul 15 18:24:19 2010
@@ -4,3 +4,4 @@
 04_homedir_env.patch
 60_wait-longer-for-threads-to-die.patch
 61_glib-compile-schemas-path.patch
+99_gsocket-create-socket-cloexec.patch




More information about the pkg-gnome-commits mailing list