diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp index 6a8942162..8aa5f1f8f 100644 --- a/src/network/kernel/qnetworkinterface.cpp +++ b/src/network/kernel/qnetworkinterface.cpp @@ -169,8 +169,7 @@ QHostAddress QNetworkAddressEntry::broadcast() const Not all operating systems support reporting all features. Only the IPv4 addresses are guaranteed to be listed by this class in all platforms. In particular, IPv6 address listing is only supported - on Windows XP and more recent versions, Linux, MacOS X and the - BSDs. + on Linux and the BSDs, hardware address only on Linux. \sa QNetworkAddressEntry */ @@ -277,12 +276,9 @@ QNetworkInterface::InterfaceFlags QNetworkInterface::flags() const } /*! - Returns the low-level hardware address for this interface. On - Ethernet interfaces, this will be a MAC address in string - representation, separated by colons. + Returns the low-level hardware address for this interface. - Other interface types may have other types of hardware - addresses. Implementations should not depend on this function + Implementations should not depend on this function returning a valid MAC address. */ QString QNetworkInterface::hardwareAddress() const diff --git a/src/network/kernel/qnetworkinterface_unix.cpp b/src/network/kernel/qnetworkinterface_unix.cpp index 9187c6163..a0f93a711 100644 --- a/src/network/kernel/qnetworkinterface_unix.cpp +++ b/src/network/kernel/qnetworkinterface_unix.cpp @@ -25,7 +25,6 @@ #include "qalgorithms.h" #include "qnet_unix_p.h" #include "qplatformdefs.h" -#include "qcorecommon_p.h" #ifndef QT_NO_NETWORKINTERFACE @@ -56,7 +55,7 @@ QList QNetworkInterfacePrivate::scan() return interfaces; } - int socket = qt_safe_socket(AF_INET, SOCK_STREAM, IPPROTO_IP); + const int socket = qt_safe_socket(AF_INET, SOCK_STREAM, IPPROTO_IP); struct ifaddrs *ifiter = nullptr; for (ifiter = iflist; ifiter; ifiter = ifiter->ifa_next) { QNetworkInterfacePrivate *iface = nullptr;