summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qnet_unix_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/socket/qnet_unix_p.h')
-rw-r--r--src/network/socket/qnet_unix_p.h27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/network/socket/qnet_unix_p.h b/src/network/socket/qnet_unix_p.h
index a5a87fc7c1..9626c53711 100644
--- a/src/network/socket/qnet_unix_p.h
+++ b/src/network/socket/qnet_unix_p.h
@@ -173,8 +173,7 @@ static inline in_addr_t qt_safe_inet_addr(const char *cp)
#endif
}
-// VxWorks' headers do not specify any const modifiers
-static inline int qt_safe_sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *to, QT_SOCKLEN_T tolen)
+static inline int qt_safe_sendmsg(int sockfd, const struct msghdr *msg, int flags)
{
#ifdef MSG_NOSIGNAL
flags |= MSG_NOSIGNAL;
@@ -183,11 +182,7 @@ static inline int qt_safe_sendto(int sockfd, const void *buf, size_t len, int fl
#endif
int ret;
-#ifdef Q_OS_VXWORKS
- EINTR_LOOP(ret, ::sendto(sockfd, (char *) buf, len, flags, (struct sockaddr *) to, tolen));
-#else
- EINTR_LOOP(ret, ::sendto(sockfd, buf, len, flags, to, tolen));
-#endif
+ EINTR_LOOP(ret, ::sendmsg(sockfd, msg, flags));
return ret;
}
@@ -199,24 +194,6 @@ static inline int qt_safe_recvmsg(int sockfd, struct msghdr *msg, int flags)
return ret;
}
-// VxWorks' headers do not specify any const modifiers
-static inline int qt_safe_sendmsg(int sockfd, const struct msghdr *msg, int flags)
-{
-#ifdef MSG_NOSIGNAL
- flags |= MSG_NOSIGNAL;
-#else
- qt_ignore_sigpipe();
-#endif
-
- int ret;
-#ifdef Q_OS_VXWORKS
- EINTR_LOOP(ret, ::sendmsg(sockfd, (struct msghdr *) msg, flags);
-#else
- EINTR_LOOP(ret, ::sendmsg(sockfd, msg, flags));
-#endif
- return ret;
-}
-
QT_END_NAMESPACE
#endif // QNET_UNIX_P_H