ref: e2bc82d84b9e30a1fe8bf4320e27c2cccf47c0dc
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);
}