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
This commit is contained in:
Svante Signell 2013-09-18 16:39:09 +02:00 committed by Dan Winship
parent 04e784e0c2
commit 1d4bb3f5d0

View File

@ -499,7 +499,7 @@ g_socket (gint domain,
return fd; return fd;
/* It's possible that libc has SOCK_CLOEXEC but the kernel does not */ /* 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 #endif
fd = socket (domain, type, protocol); fd = socket (domain, type, protocol);