summaryrefslogtreecommitdiffstats
path: root/src/network/socket
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-08-04 08:37:39 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-04 14:29:33 (GMT)
commit6d9143ebffc10a58d8d62e57e3378adae4af92cd (patch)
tree3fb60f7842dfdec4698ff726ac30a3a3b197abbe /src/network/socket
parent47c191d3c6b9c3fbe062068167888bed434ab6e2 (diff)
downloadQt-6d9143ebffc10a58d8d62e57e3378adae4af92cd.zip
Qt-6d9143ebffc10a58d8d62e57e3378adae4af92cd.tar.gz
Qt-6d9143ebffc10a58d8d62e57e3378adae4af92cd.tar.bz2
Don't try to make direct system calls on Linux.
Accept that we cannot do everything, so users using outdated toolchains may have threading problems (leaking file descriptors). It's not like this is a recent problem anyway... Reviewed-By: Bradley T. Hughes
Diffstat (limited to 'src/network/socket')
-rw-r--r--src/network/socket/qnet_unix_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/socket/qnet_unix_p.h b/src/network/socket/qnet_unix_p.h
index f38c2fc..040b3ec 100644
--- a/src/network/socket/qnet_unix_p.h
+++ b/src/network/socket/qnet_unix_p.h
@@ -85,7 +85,7 @@ static inline int qt_safe_socket(int domain, int type, int protocol, int flags =
Q_ASSERT((flags & ~O_NONBLOCK) == 0);
register int fd;
-#ifdef SOCK_CLOEXEC
+#if defined(SOCK_CLOEXEC) && defined(SOCK_NONBLOCK)
int newtype = type | SOCK_CLOEXEC;
if (flags & O_NONBLOCK)
newtype |= SOCK_NONBLOCK;