1 2 3 4 5 6 7 8
#include <stdio.h> void clearerr(FILE *stream) { flockfile(stream); clearerr_unlocked(stream); funlockfile(stream); }