From ceb3ff90e2e514538084710f9cea911c0677a806 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Thu, 8 Mar 2012 18:15:33 +0100 Subject: [PATCH] more fixes for Contiki --- net.c | 4 ++++ pdu.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/net.c b/net.c index 422ae3bc..5aad409d 100644 --- a/net.c +++ b/net.c @@ -10,7 +10,11 @@ #include #include +#ifdef HAVE_UNISTD_H #include +#elif HAVE_SYS_UNISTD_H +#include +#endif #include #ifdef HAVE_SYS_SOCKET_H #include diff --git a/pdu.c b/pdu.c index 0636a4bf..82854ad7 100644 --- a/pdu.c +++ b/pdu.c @@ -83,7 +83,11 @@ coap_pdu_t * coap_new_pdu() { coap_pdu_t *pdu; +#ifndef WITH_CONTIKI pdu = coap_pdu_init(0, 0, ntohs(COAP_INVALID_TID), COAP_MAX_PDU_SIZE); +#else /* WITH_CONTIKI */ + pdu = coap_pdu_init(0, 0, uip_ntohs(COAP_INVALID_TID), COAP_MAX_PDU_SIZE); +#endif /* WITH_CONTIKI */ #ifndef NDEBUG if (!pdu)