From 81865503a126845f1f85da33c83ef204d0545a52 Mon Sep 17 00:00:00 2001 From: Vlad Lungu Date: Fri, 4 Dec 2015 14:29:04 +0200 Subject: [PATCH] Use LWIP_PLATFORM_DIAG for LWIP fprintf() is not guaranteed to be available. Or even printf(). Signed-off-by: Vlad Lungu --- src/debug.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/debug.c b/src/debug.c index f3b6a8fc..e62a4edf 100644 --- a/src/debug.c +++ b/src/debug.c @@ -34,6 +34,11 @@ #include "encode.h" #include "net.h" +#ifdef WITH_LWIP +# define fprintf(fd, ...) LWIP_PLATFORM_DIAG((__VA_ARGS__)) +# define fflush(...) +#endif + #ifdef WITH_CONTIKI # ifndef DEBUG # define DEBUG DEBUG_PRINT