diff options
Diffstat (limited to 'lib/libc/stdio/fileno.c')
| -rw-r--r-- | lib/libc/stdio/fileno.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libc/stdio/fileno.c b/lib/libc/stdio/fileno.c index 09db0ad5..ad3eda7f 100644 --- a/lib/libc/stdio/fileno.c +++ b/lib/libc/stdio/fileno.c @@ -1,15 +1,15 @@ -#include <io.h> -#include <errno.h> -#include <atomic.h> -#include <stdio.h> +#include <atomic.h> // for LIBC_LOCK, LIBC_UNLOCK +#include <errno.h> // for EBADF, errno +#include <libc.h> // for __IMPL +#include <stdio.h> // for FILE, fileno int fileno(FILE *stream) { int fd; - LIBC_LOCK(stream->lock); - fd = stream->fd; - LIBC_UNLOCK(stream->lock); + LIBC_LOCK(__IMPL(stream)->lock); + fd = __IMPL(stream)->fd; + LIBC_UNLOCK(__IMPL(stream)->lock); if (fd < 0) { errno = EBADF; |
