diff options
author | Ralf Nolden <nolden@kde.org> | 2016-07-01 10:33:43 +0200 |
---|---|---|
committer | Ralf Nolden <nolden@kde.org> | 2016-07-03 10:54:42 +0000 |
commit | b7744e0b05255fc468db2af215ba94eca4b7757b (patch) | |
tree | 0536a292b7a6a2c61f54b6e830b6172388319317 | |
parent | daade9b90dd39aa844cb683af776b802b0786ba7 (diff) |
Replace LLINDEX macro not present on all BSDs with the code
FreeBSD < 10 doesn't have the LLINDEX macro either in net/if_dl.h, so besides
OpenBSD yet another condition to declare the LLINDEX macro for systems where
it isn't present does make it more complicated than replacing its usage with
the actual code.
Change-Id: I7e8ef3e265564526e05ec3115f9fa765d399f045
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/network/socket/qnativesocketengine_unix.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index e92123e10c..5dfc6480da 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -906,10 +906,7 @@ qint64 QNativeSocketEnginePrivate::nativeReceiveDatagram(char *data, qint64 maxS if (cmsgptr->cmsg_level == IPPROTO_IP && cmsgptr->cmsg_type == IP_RECVIF && cmsgptr->cmsg_len >= CMSG_LEN(sizeof(sockaddr_dl))) { sockaddr_dl *sdl = reinterpret_cast<sockaddr_dl *>(CMSG_DATA(cmsgptr)); -# if defined(Q_OS_OPENBSD) -# define LLINDEX(s) ((s)->sdl_index) -# endif - header->ifindex = LLINDEX(sdl); + header->ifindex = sdl->sdl_index; } # endif #endif |