summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/fileno.c
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-09 21:17:12 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-09 21:17:12 +0100
commitb5cd18739a64c8d923a55b61c89ae3900faafd84 (patch)
treed192f7b25257ae9a8a4760c68f5314dcbc0d9b91 /lib/libc/stdio/fileno.c
parent119aed5bc787ccbf23d2f151759ec1f3a80977e1 (diff)
Fix include paths and formatting inconsistencies
Diffstat (limited to 'lib/libc/stdio/fileno.c')
-rw-r--r--lib/libc/stdio/fileno.c14
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;