Skip to content

Commit 81d8a16

Browse files
committed
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)
1 parent 08acdd1 commit 81d8a16

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ check_symbol_exists(sendmsg "sys/socket.h" HAVE_SENDMSG)
111111

112112
include(TestBigEndian)
113113
test_big_endian(WORDS_BIGENDIAN)
114-
if(WORDS_BIGENDIAN)
115-
set(ORTP_BIGENDIAN 1)
116-
endif()
117114

118115

119116
include_directories(
@@ -127,6 +124,9 @@ endif()
127124

128125

129126
set(ORTP_CPPFLAGS ${BCTOOLBOX_CPPFLAGS})
127+
if(WORDS_BIGENDIAN)
128+
list(APPEND ORTP_CPPFLAGS "-DORTP_BIGENDIAN")
129+
endif()
130130
if(ENABLE_STATIC)
131131
list(APPEND ORTP_CPPFLAGS "-DORTP_STATIC")
132132
endif()

0 commit comments

Comments
 (0)