Haiku: Fix compilation of network library

Like on some BSD systems, the member of the ifreq
structure is called ifr_index and not ifr_ifindex
on Haiku OS.

Change-Id: I273de0c703b1c89dbac537c68e52db219d2da50e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Tobias Koenig 2015-12-08 15:49:44 +00:00
parent df3a05b918
commit bee2ad068e

View File

@ -231,7 +231,11 @@ static QNetworkInterfacePrivate *findInterface(int socket, QList<QNetworkInterfa
// Get the interface index
# ifdef SIOCGIFINDEX
if (qt_safe_ioctl(socket, SIOCGIFINDEX, &req) >= 0)
# if defined(Q_OS_HAIKU)
ifindex = req.ifr_index;
# else
ifindex = req.ifr_ifindex;
# endif
# else
ifindex = if_nametoindex(req.ifr_name);
# endif