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 --- CMakeLists.txt +++ CMakeLists.txt @@ -97,9 +97,6 @@ include(TestBigEndian) test_big_endian(WORDS_BIGENDIAN) -if(WORDS_BIGENDIAN) - set(ORTP_BIGENDIAN 1) -endif() include_directories( @@ -117,6 +114,9 @@ if(ENABLE_PERF) set(PERF 1) endif() +if(WORDS_BIGENDIAN) + list(APPEND ORTP_CPPFLAGS "-DORTP_BIGENDIAN") +endif() if(ENABLE_NTP_TIMESTAMP) set(ORTP_TIMESTAMP 1) list(APPEND ORTP_CPPFLAGS "-DORTP_TIMESTAMP")