Skip to content

Commit

Permalink
Windows: Patch is not available, use sed instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Nov 16, 2022
1 parent ceaed78 commit 5ad3899
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion trunk/3rdparty/libsrtp-2-fit/crypto/math/datatypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int octet_get_weight(uint8_t octet)

/* the value MAX_PRINT_STRING_LEN is defined in datatypes.h */

static char bit_string[MAX_PRINT_STRING_LEN];
char bit_string[MAX_PRINT_STRING_LEN];

uint8_t srtp_nibble_to_hex_char(uint8_t nibble)
{
Expand Down
9 changes: 8 additions & 1 deletion trunk/auto/depends.sh
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,15 @@ if [[ $SRS_RTC == YES ]]; then
rm -rf libsrtp-2-fit &&
cp -R ${SRS_WORKDIR}/3rdparty/libsrtp-2-fit . &&
cd libsrtp-2-fit &&
# For cygwin64, the patch is not available, so use sed instead.
if [[ $SRS_CYGWIN64 == YES ]]; then
sed -i 's/char bit_string/static char bit_string/g' crypto/math/datatypes.c
else
patch -p0 crypto/math/datatypes.c ${SRS_WORKDIR}/3rdparty/patches/srtp/gcc10-01.patch
fi &&
# Patch the cpu arch guessing for RISCV.
if [[ $OS_IS_RISCV == YES ]]; then
patch -p0 crypto/math/datatypes.c ${SRS_WORKDIR}/3rdparty/patches/srtp/config.guess-02.patch;
patch -p0 config.guess ${SRS_WORKDIR}/3rdparty/patches/srtp/config.guess-02.patch
fi &&
$SRTP_CONFIGURE ${SRTP_OPTIONS} --prefix=${SRS_OBJS}/${SRS_PLATFORM}/3rdpatry/srtp2 &&
make ${SRS_JOBS} && make install &&
Expand Down

0 comments on commit 5ad3899

Please sign in to comment.