1#include "stdio_impl.h"
2
3int fileno(FILE* f) {
4    /* f->fd never changes, but the lock must be obtained and released
5     * anyway since this function cannot return while another thread
6     * holds the lock. */
7    FLOCK(f);
8    FUNLOCK(f);
9    return f->fd;
10}
11
12weak_alias(fileno, fileno_unlocked);
13