* Copyright (C) 2010--2012 Olaf Bergmann <bergmann@tzi.org>
*
* This file is part of the CoAP library libcoap. Please see
- * README for terms of use.
+ * README for terms of use.
*/
#include "config.h"
#ifndef NDEBUG
#ifndef HAVE_STRNLEN
-/**
- * A length-safe strlen() fake.
- *
+/**
+ * A length-safe strlen() fake.
+ *
* @param s The string to count characters != 0.
* @param maxlen The maximum length of @p s.
- *
+ *
* @return The length of @p s.
*/
static inline size_t
{
#ifdef HAVE_ARPA_INET_H
const void *addrptr = NULL;
+#if defined(__ANDROID__)
+ __uint16_t port;
+#else
in_port_t port;
+#endif
unsigned char *p = buf;
switch (addr->addr.sa.sa_family)
#endif /* NDEBUG */
+#ifdef WITH_ARDUINO
+void coap_log_impl(coap_log_t level, const char *format, ...)
+{
+ //TODO: Implement logging functionalities for Arduino
+}
+#endif
+
+#ifndef WITH_ARDUINO
#ifndef WITH_CONTIKI
void coap_log_impl(coap_log_t level, const char *format, ...)
{
va_end(ap);
}
#endif /* WITH_CONTIKI */
+#endif