Skip to content

Commit b667bca

Browse files
committed
Merge branch 'master' into mam
2 parents 6d76ccd + fa41062 commit b667bca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+3908
-1352
lines changed

CMakeLists.txt

+4-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ include(policyRules)
3737

3838
set(CMAKE_AUTOMOC ON)
3939
set(CMAKE_INCLUDE_CURRENT_DIR ON)
40-
set(CMAKE_CXX_STANDARD 11)
40+
set(CMAKE_CXX_STANDARD 20)
4141

4242
# Detect MXE cross-compilation
4343
set(IRIS_DEFAULT_BUNDLED_USRSCTP OFF)
@@ -61,15 +61,14 @@ endif()
6161

6262
option(IRIS_ENABLE_INSTALL "Enable installation" ON)
6363
option(IRIS_ENABLE_JINGLE_SCTP "Enable SCTP over ICE Jingle transport / data channels" ON)
64-
option(IRIS_BUNDLED_QCA "Adds: DTLS, Blake2b and other useful for XMPP crypto-stuff" ${IRIS_DEFAULT_BUNDLED_QCA})
64+
# note Blake2b is needed only with Qt5. Qt6 has its own implementation
65+
option(IRIS_BUNDLED_QCA "Adds: DTLS, Blake2b (needed with Qt5) and other useful for XMPP crypto-stuff" ${IRIS_DEFAULT_BUNDLED_QCA})
6566
option(IRIS_BUNDLED_USRSCTP "Compile compatible UsrSCTP lib (required for datachannel Jingle transport)" ${IRIS_DEFAULT_BUNDLED_USRSCTP})
6667
option(IRIS_BUILD_TOOLS "Build tools and examples" OFF)
6768
option(IRIS_ENABLE_DEBUG "Enable debugging code paths" OFF)
6869

6970
set(IRIS_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}/xmpp/iris)
7071

71-
set(CMAKE_CXX_STANDARD 17)
72-
7372
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"))
7473
include(debug-definitions)
7574
endif()
@@ -101,7 +100,7 @@ if(IRIS_ENABLE_JINGLE_SCTP)
101100
include(IrisSCTP)
102101
endif()
103102

104-
if(NOT IRIS_BUNDLED_QCA)
103+
if(NOT IRIS_BUNDLED_QCA AND QT_DEFAULT_MAJOR_VERSION LESS 6)
105104
find_package(B2 QUIET)
106105
if(B2_FOUND)
107106
message(STATUS "Found B2: ${B2_LIBRARY}")

cmake/modules/IrisQCA.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ if(IRIS_BUNDLED_QCA)
6868
CMAKE_ARGS ${QCA_BUILD_OPTIONS}
6969
BUILD_BYPRODUCTS ${Qca_LIBRARY}
7070
INSTALL_COMMAND ""
71+
UPDATE_COMMAND ""
7172
)
7273
endif()
7374
else()

cmake/modules/IrisSCTP.cmake

+14-4
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,13 @@ else()
3737
-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
3838
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
3939
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER})
40-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
41-
list(APPEND USRSCTP_BUILD_OPTIONS -DCMAKE_C_FLAGS="-Wno-maybe-uninitialized")
42-
endif()
40+
# Setting these options seems to have no any effect because those prepended and not appended
41+
# if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
42+
# list(APPEND USRSCTP_BUILD_OPTIONS "-DCMAKE_C_FLAGS=-Wno-maybe-uninitialized")
43+
# endif()
44+
# if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
45+
# list(APPEND USRSCTP_BUILD_OPTIONS "-DCMAKE_C_FLAGS=-Wno-uninitialized -Wno-unused-but-set-variable")
46+
# endif()
4347
if (EXISTS ${USRSCTP_SOURCE_DIR})
4448
message(STATUS "USRSCTP: found bundled sources")
4549
ExternalProject_Add(UsrSCTPProject
@@ -56,14 +60,20 @@ else()
5660
if(NOT Git_FOUND)
5761
message(FATAL_ERROR "Git not found! Bundled UsrSCTP needs Git utility.\nPlease set GIT_EXECUTABLE variable or add git to PATH")
5862
endif()
63+
set(patch_command
64+
${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/usrsctp.patch <SOURCE_DIR> &&
65+
${GIT_EXECUTABLE} checkout <SOURCE_DIR>/usrsctplib/netinet/sctp_output.c &&
66+
${GIT_EXECUTABLE} apply <SOURCE_DIR>/usrsctp.patch)
5967
ExternalProject_Add(UsrSCTPProject
6068
PREFIX ${USRSCTP_PREFIX}
6169
BINARY_DIR ${USRSCTP_BUILD_DIR}
6270
GIT_REPOSITORY ${IrisSCTPGitRepo}
63-
GIT_TAG a17109528c75d01f6372d5c30851a639684c6e99
71+
GIT_TAG 848eca82f92273af9a79687a90343a2ebcf3481d
6472
CMAKE_ARGS ${USRSCTP_BUILD_OPTIONS}
6573
BUILD_BYPRODUCTS ${USRSCTP_LIBRARY}
6674
INSTALL_COMMAND ""
75+
PATCH_COMMAND ${patch_command}
76+
UPDATE_COMMAND ""
6777
)
6878
endif()
6979
add_library(SctpLab::UsrSCTP UNKNOWN IMPORTED)

cmake/modules/usrsctp.patch

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
3+
diff --git a/usrsctplib/netinet/sctp_output.c b/usrsctplib/netinet/sctp_output.c
4+
index b8a7b46..6f9c9b9 100644
5+
--- a/usrsctplib/netinet/sctp_output.c
6+
+++ b/usrsctplib/netinet/sctp_output.c
7+
@@ -13562,10 +13562,10 @@ sctp_lower_sosend(struct socket *so,
8+
#endif
9+
struct timeval now;
10+
struct sctp_block_entry be;
11+
- struct sctp_inpcb *inp;
12+
+ struct sctp_inpcb *inp = NULL;
13+
struct sctp_tcb *stcb = NULL;
14+
struct sctp_nets *net;
15+
- struct sctp_association *asoc;
16+
+ struct sctp_association *asoc = NULL;
17+
struct sctp_inpcb *t_inp;
18+
struct sctp_nonpad_sndrcvinfo *sndrcvninfo;
19+
ssize_t sndlen = 0, max_len, local_add_more;

include/iris/xmpp_vcard4.h

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "xmpp/xmpp-im/xmpp_vcard4.h"

src/irisnet/corelib/netinterface_qtnet.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class InterfaceMonitor : public QObject {
5151
notifier = new QSocketNotifier(netlinkFd, QSocketNotifier::Read, this);
5252

5353
connect(notifier, &QSocketNotifier::activated, this,
54-
[=](QSocketDescriptor, QSocketNotifier::Type) { emit changed(); });
54+
[this](QSocketDescriptor, QSocketNotifier::Type) { emit changed(); });
5555
}
5656

5757
~InterfaceMonitor()

0 commit comments

Comments
 (0)