Problem
webrtc-sys/src/android.cpp lines 33-37 reference __sF, a libc symbol that was removed in Android NDK 28:
#undef stdout
FILE *stdout = &__sF[1];
#undef stderr
FILE *stderr = &__sF[2];
This causes a compilation error when building with NDK 28 or 29:
src/android.cpp:34:17: error: use of undeclared identifier '__sF'
34 | FILE *stdout = &__sF[1];
Fix
Replace with POSIX-standard fdopen:
#include <unistd.h>
#undef stdout
FILE *stdout = fdopen(STDOUT_FILENO, "w");
#undef stderr
FILE *stderr = fdopen(STDERR_FILENO, "w");
This is compatible with all NDK versions.
Environment
- webrtc-sys 0.3.27
- NDK 28.0.12916984 and 29.0.14206865
- Target: aarch64-linux-android
Problem
webrtc-sys/src/android.cpplines 33-37 reference__sF, a libc symbol that was removed in Android NDK 28:This causes a compilation error when building with NDK 28 or 29:
Fix
Replace with POSIX-standard
fdopen:This is compatible with all NDK versions.
Environment