Index: uspace/lib/c/generic/private/stdio.h
===================================================================
--- uspace/lib/c/generic/private/stdio.h	(revision 6fa9a99d9fa209ffacbdbc40837bf0f435c98e1b)
+++ uspace/lib/c/generic/private/stdio.h	(revision 7db5cfdf9880d55d20d1c9ff67cdd1d2890e72f1)
@@ -39,4 +39,7 @@
 #include <stdio.h>
 #include <async.h>
+
+/** Maximum characters that can be pushed back by ungetc() */
+#define UNGETC_MAX 1
 
 struct _IO_FILE {
@@ -82,4 +85,10 @@
 	/** Points to end of occupied space when in read mode. */
 	uint8_t *buf_tail;
+
+	/** Pushed back characters */
+	uint8_t ungetc_buf[UNGETC_MAX];
+
+	/** Number of pushed back characters */
+	int ungetc_chars;
 };
 
