gio/gsocket.c: Fix error code checks when SOCK_CLOEXEC is defined but
authorSvante Signell <svante.signell@gmail.com>
Wed, 18 Sep 2013 14:39:09 +0000 (16:39 +0200)
committerDan Winship <danw@gnome.org>
Tue, 24 Sep 2013 12:59:38 +0000 (08:59 -0400)
not supported on GNU/Hurd.

https://bugzilla.gnome.org/show_bug.cgi?id=708266

gio/gsocket.c

index 8fcbce4..18e6137 100644 (file)
@@ -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);