ref: f93bd34d5a4a61ffb5bd6f5bc0150e92e61918f4
dir: /lib/c/freopen.c/
#include <stdio.h>
#include "syscall.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);
}