ref: 58b406cf181a732417b57119b9da46836a2b3ada dir: /lib/c/ferror.c/
#include <stdio.h> #undef ferror int ferror(FILE *fp) { return fp->flags & _IOERR; }