summaryrefslogtreecommitdiff
path: root/payloads/libpayload/libc
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/libc')
-rw-r--r--payloads/libpayload/libc/printf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/payloads/libpayload/libc/printf.c b/payloads/libpayload/libc/printf.c
index a1ebb14092..389d2277ea 100644
--- a/payloads/libpayload/libc/printf.c
+++ b/payloads/libpayload/libc/printf.c
@@ -36,6 +36,13 @@
#include <libpayload.h>
#include <ctype.h>
+static struct _FILE {
+} _stdout, _stdin, _stderr;
+
+FILE *stdout = &_stdout;
+FILE *stdin = &_stdin;
+FILE *stderr = &_stderr;
+
/** Structure for specifying output methods for different printf clones. */
struct printf_spec {
/* Output function, returns count of printed characters or EOF. */