summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/FindGSSAPI.cmake1
-rw-r--r--cmake/QtBuild.cmake14
-rw-r--r--cmake/QtPlatformSupport.cmake1
-rw-r--r--cmake/QtRpathHelpers.cmake2
-rw-r--r--configure.cmake2
-rw-r--r--configure.json2
-rw-r--r--src/corelib/global/qconfig-bootstrapped.h4
-rw-r--r--src/gui/configure.cmake2
-rw-r--r--src/network/CMakeLists.txt2
-rw-r--r--src/network/configure.cmake20
-rw-r--r--src/network/configure.json16
-rw-r--r--src/network/kernel/qnetworkinterface_unix.cpp10
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp4
13 files changed, 75 insertions, 5 deletions
diff --git a/cmake/FindGSSAPI.cmake b/cmake/FindGSSAPI.cmake
index 90f1c62c99..82c3952e24 100644
--- a/cmake/FindGSSAPI.cmake
+++ b/cmake/FindGSSAPI.cmake
@@ -9,6 +9,7 @@ find_path(GSSAPI_INCLUDE_DIRS
find_library(GSSAPI_LIBRARIES
NAMES
GSS # framework
+ gss # solaris
gssapi_krb5
HINTS ${PC_GSSAPILIBDIR}
)
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index f31a215a4a..f22aad3e34 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -329,6 +329,20 @@ elseif(NETBSD)
set(QT_DEFAULT_MKSPEC netbsd-g++)
elseif(OPENBSD)
set(QT_DEFAULT_MKSPEC openbsd-g++)
+elseif(SOLARIS)
+ if(GCC)
+ if(QT_64BIT)
+ set(QT_DEFAULT_MKSPEC solaris-g++-64)
+ else()
+ set(QT_DEFAULT_MKSPEC solaris-g++)
+ endif()
+ else()
+ if(QT_64BIT)
+ set(QT_DEFAULT_MKSPEC solaris-cc-64)
+ else()
+ set(QT_DEFAULT_MKSPEC solaris-cc)
+ endif()
+ endif()
endif()
if(NOT QT_QMAKE_TARGET_MKSPEC)
diff --git a/cmake/QtPlatformSupport.cmake b/cmake/QtPlatformSupport.cmake
index 94ff238418..e4c8ca123b 100644
--- a/cmake/QtPlatformSupport.cmake
+++ b/cmake/QtPlatformSupport.cmake
@@ -17,6 +17,7 @@ qt_set01(OPENBSD CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") # FIXME: How to identify
qt_set01(FREEBSD CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") # FIXME: How to identify this?
qt_set01(NETBSD CMAKE_SYSTEM_NAME STREQUAL "NetBSD") # FIXME: How to identify this?
qt_set01(WASM CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR EMSCRIPTEN)
+qt_set01(SOLARIS CMAKE_SYSTEM_NAME STREQUAL "SunOS")
qt_set01(BSD APPLE OR OPENBSD OR FREEBSD OR NETBSD)
diff --git a/cmake/QtRpathHelpers.cmake b/cmake/QtRpathHelpers.cmake
index 126ed2c50f..2e84552130 100644
--- a/cmake/QtRpathHelpers.cmake
+++ b/cmake/QtRpathHelpers.cmake
@@ -20,7 +20,7 @@ function(qt_compute_relative_rpath_base rpath install_location out_var)
# needed in the .prf files, but for CMake we need to prepend them ourselves.
if(APPLE)
set(rpath_rel_base "@loader_path")
- elseif(LINUX)
+ elseif(LINUX OR SOLARIS)
set(rpath_rel_base "$ORIGIN")
else()
message(WARNING "No known RPATH_REL_BASE for target platform.")
diff --git a/configure.cmake b/configure.cmake
index 3412703333..dabef32706 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -143,7 +143,7 @@ qt_config_linker_supports_flag_test(gdb_index
qt_config_compile_test(reduce_relocations
LABEL "-Bsymbolic-functions support"
CODE
-"#if !(defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64))
+"#if !(defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64)) || defined (__sun)
# error Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129).
#endif
diff --git a/configure.json b/configure.json
index b656ad1bda..2726754440 100644
--- a/configure.json
+++ b/configure.json
@@ -451,7 +451,7 @@
"type": "compile",
"test": {
"head": [
- "#if !(defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64))",
+ "#if !(defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64)) || defined(__sun)",
"# error Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129).",
"#endif"
],
diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h
index a3db9231a9..9019bfd089 100644
--- a/src/corelib/global/qconfig-bootstrapped.h
+++ b/src/corelib/global/qconfig-bootstrapped.h
@@ -84,7 +84,11 @@
#define QT_FEATURE_datetimeparser -1
#define QT_FEATURE_easingcurve -1
#define QT_FEATURE_etw -1
+#if defined(__linux__) || defined(__GLIBC__)
#define QT_FEATURE_getauxval (__has_include(<sys/auxv.h>) ? 1 : -1)
+#else
+#define QT_FEATURE_getauxval -1
+#endif
#define QT_FEATURE_getentropy -1
#define QT_NO_GEOM_VARIANT
#define QT_FEATURE_hijricalendar -1
diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake
index a26610bf98..cb6b0a5cc2 100644
--- a/src/gui/configure.cmake
+++ b/src/gui/configure.cmake
@@ -25,7 +25,7 @@ set_property(CACHE INPUT_libpng PROPERTY STRINGS undefined no qt system)
#### Libraries
-qt_set01(X11_SUPPORTED LINUX OR HPUX OR FREEBSD OR NETBSD OR OPENBSD) # special case
+qt_set01(X11_SUPPORTED LINUX OR HPUX OR FREEBSD OR NETBSD OR OPENBSD OR SOLARIS) # special case
qt_find_package(ATSPI2 PROVIDED_TARGETS PkgConfig::ATSPI2 MODULE_NAME gui QMAKE_LIB atspi)
qt_find_package(DirectFB PROVIDED_TARGETS PkgConfig::DirectFB MODULE_NAME gui QMAKE_LIB directfb)
qt_find_package(Libdrm PROVIDED_TARGETS Libdrm::Libdrm MODULE_NAME gui QMAKE_LIB drm)
diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt
index e49b8d8930..f3802e37e9 100644
--- a/src/network/CMakeLists.txt
+++ b/src/network/CMakeLists.txt
@@ -427,6 +427,8 @@ qt_internal_extend_target(Network CONDITION WIN32 PUBLIC_LIBRARIES ws2_32) # spe
qt_internal_extend_target(Network CONDITION QNX PUBLIC_LIBRARIES socket) # special case: mkspecs/common/qcc-base-qnx.conf
+qt_internal_extend_target(Network CONDITION SOLARIS PUBLIC_LIBRARIES socket nsl) # special case
+
# include the snippet projects for developer-builds
if(QT_FEATURE_private_tests)
add_subdirectory(doc/snippets/network)
diff --git a/src/network/configure.cmake b/src/network/configure.cmake
index be4c532df6..f1885a6ff8 100644
--- a/src/network/configure.cmake
+++ b/src/network/configure.cmake
@@ -81,6 +81,22 @@ freeifaddrs(list);
"# FIXME: use: unmapped library: network
)
+# ifr_index
+qt_config_compile_test(ifr_index
+ LABEL "ifr_index"
+ CODE
+"#include <net/if.h>
+
+int main(void)
+{
+ /* BEGIN TEST: */
+struct ifreq req;
+req.ifr_index = 0;
+ /* END TEST: */
+ return 0;
+}
+")
+
# ipv6ifname
qt_config_compile_test(ipv6ifname
LABEL "IPv6 ifname"
@@ -220,6 +236,10 @@ qt_feature("getifaddrs" PUBLIC
CONDITION TEST_getifaddrs
)
qt_feature_definition("getifaddrs" "QT_NO_GETIFADDRS" NEGATE VALUE "1")
+qt_feature("ifr_index" PRIVATE
+ LABEL "ifr_index"
+ CONDITION TEST_ifr_index
+)
qt_feature("ipv6ifname" PUBLIC
LABEL "IPv6 ifname"
CONDITION TEST_ipv6ifname
diff --git a/src/network/configure.json b/src/network/configure.json
index b037eee75c..d1ee15d80b 100644
--- a/src/network/configure.json
+++ b/src/network/configure.json
@@ -142,6 +142,17 @@
},
"use": "network"
},
+ "ifr_index": {
+ "label": "ifr_index",
+ "type": "compile",
+ "test": {
+ "include": "net/if.h",
+ "main": [
+ "struct ifreq req;",
+ "req.ifr_index = 0;"
+ ]
+ }
+ },
"ipv6ifname": {
"label": "IPv6 ifname",
"type": "compile",
@@ -238,6 +249,11 @@
"condition": "tests.getifaddrs",
"output": [ "feature" ]
},
+ "ifr_index": {
+ "label": "ifr_index",
+ "condition": "tests.ifr_index",
+ "output": [ "privateFeature" ]
+ },
"ipv6ifname": {
"label": "IPv6 ifname",
"condition": "tests.ipv6ifname",
diff --git a/src/network/kernel/qnetworkinterface_unix.cpp b/src/network/kernel/qnetworkinterface_unix.cpp
index 5b34b99caa..b1e351a289 100644
--- a/src/network/kernel/qnetworkinterface_unix.cpp
+++ b/src/network/kernel/qnetworkinterface_unix.cpp
@@ -111,7 +111,11 @@ uint QNetworkInterfaceManager::interfaceIndexFromName(const QString &name)
uint id = 0;
if (qt_safe_ioctl(socket, SIOCGIFINDEX, &req) >= 0)
+# if QT_CONFIG(ifr_index)
+ id = req.ifr_index;
+# else
id = req.ifr_ifindex;
+# endif
qt_safe_close(socket);
return id;
#else
@@ -130,7 +134,11 @@ QString QNetworkInterfaceManager::interfaceNameFromIndex(uint index)
int socket = qt_safe_socket(AF_INET, SOCK_STREAM, 0);
if (socket >= 0) {
memset(&req, 0, sizeof(ifreq));
+# if QT_CONFIG(ifr_index)
+ req.ifr_index = index;
+# else
req.ifr_ifindex = index;
+# endif
if (qt_safe_ioctl(socket, SIOCGIFNAME, &req) >= 0) {
qt_safe_close(socket);
@@ -216,7 +224,7 @@ 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)
+# if QT_CONFIG(ifr_index)
ifindex = req.ifr_index;
# else
ifindex = req.ifr_ifindex;
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index a817bb8300..09d16fa908 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -783,7 +783,11 @@ QNetworkInterface QNativeSocketEnginePrivate::nativeMulticastInterface() const
return QNetworkInterface::interfaceFromIndex(v);
}
+#if defined(Q_OS_SOLARIS)
+ struct in_addr v = { 0, 0, 0, 0};
+#else
struct in_addr v = { 0 };
+#endif
QT_SOCKOPTLEN_T sizeofv = sizeof(v);
if (::getsockopt(socketDescriptor, IPPROTO_IP, IP_MULTICAST_IF, &v, &sizeofv) == -1)
return QNetworkInterface();