Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/cmake/modules/usrsctp.patch b/cmake/modules/usrsctp.patch
- new file mode 100644
- index 0000000..25a6d23
- --- /dev/null
- +++ b/cmake/modules/usrsctp.patch
- @@ -0,0 +1,19 @@
- +
- +
- +diff --git a/usrsctplib/netinet/sctp_output.c b/usrsctplib/netinet/sctp_output.c
- +index b8a7b46..6f9c9b9 100644
- +--- a/usrsctplib/netinet/sctp_output.c
- ++++ b/usrsctplib/netinet/sctp_output.c
- +@@ -13562,10 +13562,10 @@ sctp_lower_sosend(struct socket *so,
- + #endif
- + struct timeval now;
- + struct sctp_block_entry be;
- +- struct sctp_inpcb *inp;
- ++ struct sctp_inpcb *inp = NULL;
- + struct sctp_tcb *stcb = NULL;
- + struct sctp_nets *net;
- +- struct sctp_association *asoc;
- ++ struct sctp_association *asoc = NULL;
- + struct sctp_inpcb *t_inp;
- + struct sctp_nonpad_sndrcvinfo *sndrcvninfo;
- + ssize_t sndlen = 0, max_len, local_add_more;
- diff --git a/cmake/modules/IrisSCTP.cmake b/cmake/modules/IrisSCTP.cmake
- index 1bfa434..e6f1e18 100644
- --- a/cmake/modules/IrisSCTP.cmake
- +++ b/cmake/modules/IrisSCTP.cmake
- @@ -60,6 +60,10 @@ else()
- if(NOT Git_FOUND)
- message(FATAL_ERROR "Git not found! Bundled UsrSCTP needs Git utility.\nPlease set GIT_EXECUTABLE variable or add git to PATH")
- endif()
- + set(patch_command
- + ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/usrsctp.patch <SOURCE_DIR> &&
- + ${GIT_EXECUTABLE} checkout <SOURCE_DIR>/usrsctplib/netinet/sctp_output.c &&
- + ${GIT_EXECUTABLE} apply <SOURCE_DIR>/usrsctp.patch)
- ExternalProject_Add(UsrSCTPProject
- PREFIX ${USRSCTP_PREFIX}
- BINARY_DIR ${USRSCTP_BUILD_DIR}
- @@ -68,6 +72,7 @@ else()
- CMAKE_ARGS ${USRSCTP_BUILD_OPTIONS}
- BUILD_BYPRODUCTS ${USRSCTP_LIBRARY}
- INSTALL_COMMAND ""
- + PATCH_COMMAND ${patch_command}
- )
- endif()
- add_library(SctpLab::UsrSCTP UNKNOWN IMPORTED)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement