ref: d4eb944af8f3300db2c7683dec0f8d1fb431560c
dir: /src/libc/stdio/freopen.c/
#include <stdio.h> #include "../syscall.h" #include "../libc.h" #undef freopen FILE * freopen(const char * restrict name, const char * restrict mode, FILE * restrict fp) { if (fclose(fp) == EOF) return NULL; return _fpopen(name, mode, fp); }