summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qnativesocketengine_unix.cpp
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2023-05-26 12:14:04 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2023-05-26 23:06:50 +0200
commit456cfa0bd21a97fc82913537a63533e2d3d43178 (patch)
tree1e7431b38197e69ab8f73ee53aa319824fa3ead9 /src/network/socket/qnativesocketengine_unix.cpp
parentf3d0f4f4c37de11595122c589ec512d10aa7e94a (diff)
Network: Fix IFF_UP conflict on Linux with unity builds
I cannot repro this myself, but from the bug report it seems to be defined in two headers, so we should consistently use the same one. Fixes: QTBUG-113787 Pick-to: 6.5 Change-Id: I9f1cc51e379c33dbbf659946340a5207aaeb448a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/network/socket/qnativesocketengine_unix.cpp')
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index dd3c57de1e4..d5f2bfbac44 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -18,7 +18,11 @@
#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>