add support for mips and mips64 r6 isa
[musl] / src / stdio / fflush.c
index 7bf862a..3f462c8 100644 (file)
@@ -35,13 +35,12 @@ int fflush(FILE *f)
 
        r = __stdout_used ? fflush(__stdout_used) : 0;
 
-       OFLLOCK();
-       for (f=libc.ofl_head; f; f=f->next) {
+       for (f=*__ofl_lock(); f; f=f->next) {
                FLOCK(f);
                if (f->wpos > f->wbase) r |= __fflush_unlocked(f);
                FUNLOCK(f);
        }
-       OFLUNLOCK();
+       __ofl_unlock();
        
        return r;
 }