QNetworkInterface: Fold the test for if_nameindex into the config test

No need to make workarounds for Android in the .cpp source. Just let it
fail (if it still has to fail).

Change-Id: Iaf4157b7efa2416d898cfffd14d94ebcb4d979be
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
Thiago Macieira 2017-08-09 15:42:03 -07:00
parent 94c4827a9f
commit 643d19f87b
2 changed files with 2 additions and 6 deletions

View File

@ -135,7 +135,8 @@
"main": [
"char buf[IFNAMSIZ];",
"if_nametoindex(\"eth0\");",
"if_indextoname(1, buf);"
"if_indextoname(1, buf);",
"if_freenameindex(if_nameindex());"
]
},
"use": "network"

View File

@ -60,11 +60,6 @@
# define QT_NO_GETIFADDRS
#endif
#ifdef Q_OS_ANDROID
// android lacks if_nameindex
# define QT_NO_IPV6IFNAME
#endif
#ifdef Q_OS_HAIKU
# include <sys/sockio.h>
# define IFF_RUNNING 0x0001