}
int v = -1;
- QT_SOCKOPTLEN_T len = sizeof(v);
+ QT_SOCKLEN_T len = sizeof(v);
if (::getsockopt(socketDescriptor, level, n, (char *) &v, &len) != -1)
return v;
#ifndef QT_NO_IPV6
if (socketProtocol == QAbstractSocket::IPv6Protocol) {
uint v;
- QT_SOCKOPTLEN_T sizeofv = sizeof(v);
+ QT_SOCKLEN_T sizeofv = sizeof(v);
if (::getsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_MULTICAST_IF, &v, &sizeofv) == -1)
return QNetworkInterface();
return QNetworkInterface::interfaceFromIndex(v);
#endif
struct in_addr v = { 0 };
- QT_SOCKOPTLEN_T sizeofv = sizeof(v);
+ QT_SOCKLEN_T sizeofv = sizeof(v);
if (::getsockopt(socketDescriptor, IPPROTO_IP, IP_MULTICAST_IF, &v, &sizeofv) == -1)
return QNetworkInterface();
if (v.s_addr != 0 && sizeofv >= sizeof(v)) {
// Determine the socket type (UDP/TCP)
int value = 0;
- QT_SOCKOPTLEN_T valueSize = sizeof(int);
+ QT_SOCKLEN_T valueSize = sizeof(int);
if (::getsockopt(socketDescriptor, SOL_SOCKET, SO_TYPE, &value, &valueSize) == 0) {
if (value == SOCK_STREAM)
socketType = QAbstractSocket::TcpSocket;
QT_BEGIN_NAMESPACE
-// Almost always the same. If not, specify in qplatformdefs.h.
-#if !defined(QT_SOCKOPTLEN_T)
-# define QT_SOCKOPTLEN_T QT_SOCKLEN_T
-#endif
-
// UnixWare 7 redefines socket -> _socket
static inline int qt_safe_socket(int domain, int type, int protocol, int flags = 0)
{