summaryrefslogtreecommitdiffstats
path: root/usr/klibc/stdio/fileno.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/klibc/stdio/fileno.c')
-rw-r--r--usr/klibc/stdio/fileno.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/klibc/stdio/fileno.c b/usr/klibc/stdio/fileno.c
new file mode 100644
index 0000000..16c15dd
--- /dev/null
+++ b/usr/klibc/stdio/fileno.c
@@ -0,0 +1,8 @@
+#define __NO_STDIO_INLINES
+#include "stdioint.h"
+
+int fileno(FILE *__f)
+{
+ return __f->_IO_fileno;
+}
+__ALIAS(int, fileno_unlocked, (FILE *), fileno)