1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Compile: Add aarch64 to the conditions of use of the cbrt function. v6.0.72 (#3776)

I got an error when cross-compiling the aarch64 platform, the log is as
follows:
`./libavutil/libm.h:54:32: error: static declaration of 'cbrt' follows
non-static declaration`
I see that there are such compilation errors in the
trunk/auto/depends.sh file that have been resolved for the ARM and MIPSE
platforms, and it is recommended to add the ARCH64 platform
This commit is contained in:
terrencetang2023 2023-08-31 08:51:23 +08:00 committed by GitHub
parent aa5ec87fcb
commit a2e10f12e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 3 deletions

View file

@ -608,7 +608,7 @@ if [[ $SRS_FFMPEG_FIT == YES ]]; then
# For MIPS, which fail with:
# ./libavutil/libm.h:54:32: error: static declaration of 'cbrt' follows non-static declaration
# /root/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/math.h:163:13: note: previous declaration of 'cbrt' was here
if [[ $SRS_CROSS_BUILD_ARCH == "mipsel" || $SRS_CROSS_BUILD_ARCH == "arm" ]]; then
if [[ $SRS_CROSS_BUILD_ARCH == "mipsel" || $SRS_CROSS_BUILD_ARCH == "arm" || $SRS_CROSS_BUILD_ARCH == "aarch64" ]]; then
sed -i -e 's/#define HAVE_CBRT 0/#define HAVE_CBRT 1/g' ${SRS_OBJS}/${SRS_PLATFORM}/ffmpeg-4-fit/config.h &&
sed -i -e 's/#define HAVE_CBRTF 0/#define HAVE_CBRTF 1/g' ${SRS_OBJS}/${SRS_PLATFORM}/ffmpeg-4-fit/config.h &&
sed -i -e 's/#define HAVE_COPYSIGN 0/#define HAVE_COPYSIGN 1/g' ${SRS_OBJS}/${SRS_PLATFORM}/ffmpeg-4-fit/config.h &&