PinNaCode/magiskboot_build

use --wrap to override standand library functions

ookiineko opened this issue · 3 comments

REALLY, makes life easier

this now blocks me from updating to newer magisk

i want to reuse the fopen stub for other platforms as well

im still unable to update the magisk version, macos linker doesn't have --wrap, neither in its lld driver

then maybe dont use it

i think fopen stub is probably not needed on other platforms

this works on macos, wine (but not on native windows???) and emscripten

#include <stdio.h>

int main() {
        FILE *fp = fopen("test.txt", "re");

        printf("fp = %p\n", fp);

        if (fp) 
                fclose(fp);
}