From ee1d98de4714c0996acfe4aec09dd38256fffd6f Mon Sep 17 00:00:00 2001 From: Adrien Bioteau Date: Thu, 9 Jun 2022 15:51:43 +0200 Subject: [PATCH] Fix cmake to add big endian compile option Without this fix, mediastreamer2 doesn't have this compile option (CMakeLists.txt#L669) with CMake and it might create RTP packet with wrong payload type in header due to markbit field update (src/otherfilters/msrtp.c#L633) --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c4ea1b7..6d38108f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,9 +100,6 @@ check_symbol_exists(sendmsg "sys/socket.h" HAVE_SENDMSG) include(TestBigEndian) test_big_endian(WORDS_BIGENDIAN) -if(WORDS_BIGENDIAN) - set(ORTP_BIGENDIAN 1) -endif() include_directories( @@ -116,6 +113,9 @@ endif() set(ORTP_CPPFLAGS ${BCTOOLBOX_CPPFLAGS}) +if(WORDS_BIGENDIAN) + list(APPEND ORTP_CPPFLAGS "-DORTP_BIGENDIAN") +endif() if(ENABLE_STATIC) list(APPEND ORTP_CPPFLAGS "-DORTP_STATIC") endif()