From cd0fa4bc476c4a66aa0d1ddca1e24b931fe7f3d6 Mon Sep 17 00:00:00 2001 From: "federico.gherardi" Date: Sun, 1 Mar 2026 00:33:34 +0100 Subject: [PATCH] ANDROID: add --wrap=fopen linker flag to src/Makefile --- src/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Makefile b/src/Makefile index 8f107a749..4771dcb65 100644 --- a/src/Makefile +++ b/src/Makefile @@ -607,6 +607,9 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID) LDFLAGS += -Lsrc # Avoid unresolved symbol pointing to external main() LDFLAGS += -Wl,-undefined,dynamic_lookup + # Wrap fopen at link time so all code (including third-party libs) goes + # through __wrap_fopen, which handles Android APK asset loading + LDFLAGS += -Wl,--wrap=fopen endif # Define libraries required on linking: LDLIBS