From 38d4d2802e45812963d24538530fc5b55a608922 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 81bb752a..523ac06a 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()