fix: restore qnativesocketengine_unix.cpp from tarball (remove broken include)
The committed git state had a broken #include from a concurrent session. The atomic build extracts the clean tarball, but the dirty git-tracked file was never committed clean. Reverted to tarball version.
This commit is contained in:
@@ -148,9 +148,7 @@ static void convertToLevelAndOption(QNativeSocketEngine::SocketOption opt,
|
||||
case QNativeSocketEngine::ReceiveHopLimit:
|
||||
if (socketProtocol == QAbstractSocket::IPv6Protocol || socketProtocol == QAbstractSocket::AnyIPProtocol) {
|
||||
level = IPPROTO_IPV6;
|
||||
#ifdef IPV6_RECVHOPLIMIT
|
||||
n = IPV6_RECVHOPLIMIT;
|
||||
#endif
|
||||
} else if (socketProtocol == QAbstractSocket::IPv4Protocol) {
|
||||
#ifdef IP_RECVTTL // IP_RECVTTL is a non-standard extension supported on some OS
|
||||
level = IPPROTO_IP;
|
||||
@@ -1060,12 +1058,8 @@ qint64 QNativeSocketEnginePrivate::nativeReceiveDatagram(char *data, qint64 maxS
|
||||
#endif
|
||||
|
||||
if (cmsgptr->cmsg_len == CMSG_LEN(sizeof(int))
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
&& ((cmsgptr->cmsg_level == IPPROTO_IPV6 && cmsgptr->cmsg_type == IPV6_HOPLIMIT)
|
||||
|| (cmsgptr->cmsg_level == IPPROTO_IP && cmsgptr->cmsg_type == IP_TTL))) {
|
||||
#else
|
||||
&& (cmsgptr->cmsg_level == IPPROTO_IP && cmsgptr->cmsg_type == IP_TTL)) {
|
||||
#endif
|
||||
static_assert(sizeof(header->hopLimit) == sizeof(int));
|
||||
memcpy(&header->hopLimit, CMSG_DATA(cmsgptr), sizeof(header->hopLimit));
|
||||
}
|
||||
@@ -1122,20 +1116,6 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l
|
||||
}
|
||||
|
||||
if (msg.msg_namelen == sizeof(aa.a6)) {
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
if (header.hopLimit != -1) {
|
||||
msg.msg_controllen += CMSG_SPACE(sizeof(int));
|
||||
cmsgptr->cmsg_len = CMSG_LEN(sizeof(int));
|
||||
@@ -1144,20 +1124,6 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l
|
||||
memcpy(CMSG_DATA(cmsgptr), &header.hopLimit, sizeof(int));
|
||||
cmsgptr = reinterpret_cast<cmsghdr *>(reinterpret_cast<char *>(cmsgptr) + CMSG_SPACE(sizeof(int)));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
if (header.ifindex != 0 || !header.senderAddress.isNull()) {
|
||||
struct in6_pktinfo *data = reinterpret_cast<in6_pktinfo *>(CMSG_DATA(cmsgptr));
|
||||
memset(data, 0, sizeof(*data));
|
||||
|
||||
Reference in New Issue
Block a user