CMake/Network: limit the testing for some network iface features
These features are now only used for qnetworkinterface_unix.cpp, so they aren't needed for Windows or for Linux with AF_NETLINK support. This commit removes the last couple of placess outside of that file where they were used (the qnativesocketengine_unix.cpp code looked stale anyway). These tests cost us approximately 1300 ms during CMake time. This commit does not change that because the tests are checked even if the condition has already been forced OFF by previous conditions. [ChangeLog][Build system] The QT_NO_GETIFADDRS and QT_NO_IPV6IFNAME macros are deprecated. On a standard Linux build, they will be defined to 1, even if the system does support getifaddrs() and ifnametoindex(). Task-number: QTBUG-107248 Task-number: QTBUG-115705 Change-Id: Ifbf974a4d10745b099b1fffd17775822a1a6e55f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>bb10
parent
8051edfdb5
commit
fcb548878b
|
|
@ -209,16 +209,16 @@ connectionPointContainer->FindConnectionPoint(IID_INetworkConnectionEvents, &con
|
|||
|
||||
qt_feature("getifaddrs" PUBLIC
|
||||
LABEL "getifaddrs()"
|
||||
CONDITION TEST_getifaddrs
|
||||
CONDITION UNIX AND NOT QT_FEATURE_linux_netlink AND TEST_getifaddrs
|
||||
)
|
||||
qt_feature_definition("getifaddrs" "QT_NO_GETIFADDRS" NEGATE VALUE "1")
|
||||
qt_feature("ifr_index" PRIVATE
|
||||
LABEL "ifr_index"
|
||||
CONDITION TEST_ifr_index
|
||||
CONDITION UNIX AND NOT QT_FEATURE_linux_netlink AND TEST_ifr_index
|
||||
)
|
||||
qt_feature("ipv6ifname" PUBLIC
|
||||
LABEL "IPv6 ifname"
|
||||
CONDITION TEST_ipv6ifname
|
||||
CONDITION UNIX AND NOT QT_FEATURE_linux_netlink AND TEST_ipv6ifname
|
||||
)
|
||||
qt_feature_definition("ipv6ifname" "QT_NO_IPV6IFNAME" NEGATE VALUE "1")
|
||||
qt_feature("libresolv" PRIVATE
|
||||
|
|
|
|||
|
|
@ -17,19 +17,6 @@
|
|||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#ifndef QT_NO_IPV6IFNAME
|
||||
#ifdef Q_OS_LINUX
|
||||
#include <linux/if.h>
|
||||
#else // Q_OS_LINUX
|
||||
#include <net/if.h>
|
||||
#endif // !Q_OS_LINUX
|
||||
#endif
|
||||
#ifdef QT_LINUXBASE
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef Q_OS_BSD4
|
||||
#include <net/if_dl.h>
|
||||
#endif
|
||||
#ifdef Q_OS_INTEGRITY
|
||||
#include <sys/uio.h>
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue