summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index fcc9ae7c21c..5c076d6ce18 100644
--- a/include/common.h
+++ b/include/common.h
@@ -830,11 +830,18 @@ int getc(void);
int tstc(void);
/* stdout */
+#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_SERIAL_SUPPORT)
+#define putc(...) do { } while (0)
+#define puts(...) do { } while (0)
+#define printf(...) do { } while (0)
+#define vprintf(...) do { } while (0)
+#else
void putc(const char c);
void puts(const char *s);
int printf(const char *fmt, ...)
__attribute__ ((format (__printf__, 1, 2)));
int vprintf(const char *fmt, va_list args);
+#endif
/* stderr */
#define eputc(c) fputc(stderr, c)