[glib] gio/gsocket.c: Fix error code checks when SOCK_CLOEXEC is defined but not supported on GNU/Hurd.



commit 1d4bb3f5d0e88754aedb04d0a7df0e0c2788e363
Author: Svante Signell <svante signell gmail com>
Date:   Wed Sep 18 16:39:09 2013 +0200

    gio/gsocket.c: Fix error code checks when SOCK_CLOEXEC is defined but
    not supported on GNU/Hurd.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708266

 gio/gsocket.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gsocket.c b/gio/gsocket.c
index 8fcbce4..18e6137 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -499,7 +499,7 @@ g_socket (gint     domain,
     return fd;
 
   /* It's possible that libc has SOCK_CLOEXEC but the kernel does not */
-  if (fd < 0 && errno == EINVAL)
+  if (fd < 0 && (errno == EINVAL || errno == EPROTOTYPE))
 #endif
     fd = socket (domain, type, protocol);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]