From 119291d083deb73e9bc053e38ff6d6482b5f38ab Mon Sep 17 00:00:00 2001 From: Jens Dede Date: Mon, 2 May 2016 19:13:26 +0200 Subject: [PATCH] Fix putchar include when using IPv4 --- cpu/msp430/dev/uart0-putchar.c | 5 ++++- cpu/msp430/dev/uart1-putchar.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cpu/msp430/dev/uart0-putchar.c b/cpu/msp430/dev/uart0-putchar.c index 819f627d2..c9fa974a6 100644 --- a/cpu/msp430/dev/uart0-putchar.c +++ b/cpu/msp430/dev/uart0-putchar.c @@ -1,9 +1,12 @@ -#include "dev/uart0.h" #include +#include "dev/uart0.h" +#ifndef NETSTACK_CONF_WITH_IPV4 +/* In case of IPv4: putchar() is defined by the SLIP driver */ int putchar(int c) { uart0_writeb((char)c); return c; } +#endif /* NETSTACK_CONF_WITH_IPV4 */ diff --git a/cpu/msp430/dev/uart1-putchar.c b/cpu/msp430/dev/uart1-putchar.c index 3d7f65c7b..c966b920d 100644 --- a/cpu/msp430/dev/uart1-putchar.c +++ b/cpu/msp430/dev/uart1-putchar.c @@ -1,9 +1,12 @@ #include #include "dev/uart1.h" +#ifndef NETSTACK_CONF_WITH_IPV4 +/* In case of IPv4: putchar() is defined by the SLIP driver */ int putchar(int c) { uart1_writeb((char)c); return c; } +#endif /* NETSTACK_CONF_WITH_IPV4 */