From f4116b3d5246460c6b18230b88973bf961f5347c Mon Sep 17 00:00:00 2001 From: Sean DuBois Date: Wed, 27 Nov 2019 13:49:39 -0800 Subject: [PATCH] Add patch to increase usrsctp SCTP_DIAG_INFO_LEN Building usrsctp in a directory with a long path causes a Werror=format-truncation to be hit. Increase this path so we don't have to turn off errors/warnings --- cmake-scripts/libusrsctp-CMakeLists.txt | 4 ++-- cmake-scripts/libusrsctp-diag-info-size.patch | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 cmake-scripts/libusrsctp-diag-info-size.patch diff --git a/cmake-scripts/libusrsctp-CMakeLists.txt b/cmake-scripts/libusrsctp-CMakeLists.txt index 496c0f0235..750a422342 100644 --- a/cmake-scripts/libusrsctp-CMakeLists.txt +++ b/cmake-scripts/libusrsctp-CMakeLists.txt @@ -8,8 +8,8 @@ ExternalProject_Add(project_libusrsctp GIT_REPOSITORY https://github.com/sctplab/usrsctp.git GIT_TAG 913de3599feded8322882bdae69f346da5a258fc PREFIX ${CMAKE_CURRENT_BINARY_DIR}/build - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/../local/ -DCMAKE_C_FLAGS="-Wno-error" + PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/../../cmake-scripts/libusrsctp-diag-info-size.patch + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/../local/ BUILD_ALWAYS TRUE TEST_COMMAND "" ) diff --git a/cmake-scripts/libusrsctp-diag-info-size.patch b/cmake-scripts/libusrsctp-diag-info-size.patch new file mode 100644 index 0000000000..0e21434bd4 --- /dev/null +++ b/cmake-scripts/libusrsctp-diag-info-size.patch @@ -0,0 +1,11 @@ +--- a/usrsctplib/netinet/sctp_constants.h ++++ b/usrsctplib/netinet/sctp_constants.h +@@ -769,7 +769,7 @@ extern void getwintimeofday(struct timeval *tv); + #define SCTP_DEFAULT_SPLIT_POINT_MIN 2904 + + /* Maximum length of diagnostic information in error causes */ +-#define SCTP_DIAG_INFO_LEN 128 ++#define SCTP_DIAG_INFO_LEN 1280 + + /* ABORT CODES and other tell-tale location + * codes are generated by adding the below