From 81d8a16384fb11f47b35bb5534d2f0a6d65d6094 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 1c1217c4..60200989 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,9 +111,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( @@ -127,6 +124,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()