OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9dcb636
)
conditional Solaris connect() workaround
author
Ivailo Monev
<xakepa10@gmail.com>
Thu, 16 Sep 2021 13:49:00 +0000
(16:49 +0300)
committer
Ivailo Monev
<xakepa10@gmail.com>
Thu, 16 Sep 2021 13:49:00 +0000
(16:49 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/network/socket/qnet_unix_p.h
patch
|
blob
|
history
diff --git
a/src/network/socket/qnet_unix_p.h
b/src/network/socket/qnet_unix_p.h
index
949eecb
..
0ae8576
100644
(file)
--- a/
src/network/socket/qnet_unix_p.h
+++ b/
src/network/socket/qnet_unix_p.h
@@
-75,8
+75,12
@@
static inline int qt_safe_accept(int s, struct sockaddr *addr, QT_SOCKLEN_T *add
static inline int qt_safe_connect(int sockfd, const struct sockaddr *addr, QT_SOCKLEN_T addrlen)
{
int ret;
- // Solaris e.g. expects a non-const 2nd parameter
+#ifdef Q_OS_SOLARIS
+ // Solaris expects a non-const 2nd parameter
Q_EINTR_LOOP(ret, QT_SOCKET_CONNECT(sockfd, const_cast<struct sockaddr *>(addr), addrlen));
+#else
+ Q_EINTR_LOOP(ret, QT_SOCKET_CONNECT(sockfd, addr, addrlen));
+#endif
return ret;
}