diff --git a/sys/shell/shell.c b/sys/shell/shell.c
index f8f62b3cf47820c7b8b968148cdf11c1d524fd67..5b1d5d02db84bdee769abe7ccc2c01b4742f7e1c 100644
--- a/sys/shell/shell.c
+++ b/sys/shell/shell.c
@@ -32,6 +32,7 @@
 #include "shell.h"
 #include "shell_commands.h"
 
+#ifndef SHELL_NO_ECHO
 #ifdef MODULE_NEWLIB
 /* use local copy of putchar, as it seems to be inlined,
  * enlarging code by 50% */
@@ -41,6 +42,7 @@ static void _putchar(int c) {
 #else
 #define _putchar putchar
 #endif
+#endif
 
 static shell_command_handler_t find_handler(const shell_command_t *command_list, char *command)
 {