From 7503262aa94baea63ef81ba90926eed3830b2c23 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Fri, 6 Jan 2012 15:27:48 +0100 Subject: [PATCH] some fixes for platform minimal-net --- Makefile | 2 +- debug.c | 4 ++-- pdu.c | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 211ac6ed..92e2a33d 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ UIP_CONF_IPV6=1 #CFLAGS += -DUIP_CONF_IPV6_RPL=1 ifeq ($(TARGET), minimal-net) -CFLAGS += -DHAVE_ASSERT_H +CFLAGS += -DHAVE_ASSERT_H -DWITH_UIP6=1 endif ifeq ($(TARGET), mbxxx) diff --git a/debug.c b/debug.c index 3b025962..67a0384b 100644 --- a/debug.c +++ b/debug.c @@ -67,8 +67,8 @@ static inline size_t print_timestamp(char *s, size_t len, coap_tick_t t) { #ifdef HAVE_SNPRINTF return snprintf(s, len, "%u.%03u", - clock_offset + (t / COAP_TICKS_PER_SECOND), - t % COAP_TICKS_PER_SECOND); + (unsigned int)(clock_offset + (t / COAP_TICKS_PER_SECOND)), + (unsigned int)(t % COAP_TICKS_PER_SECOND)); #else /* HAVE_SNPRINTF */ /* @todo do manual conversion of timestamp */ return 0; diff --git a/pdu.c b/pdu.c index b40d5bfb..03e506a6 100644 --- a/pdu.c +++ b/pdu.c @@ -8,6 +8,10 @@ #include "config.h" +#if defined(HAVE_ASSERT_H) && !defined(assert) +# include +#endif + #include #include #include