You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/11/01 19:01:45 UTC

[3/3] incubator-mynewt-core git commit: oic - Fix some build errors on linux.

oic - Fix some build errors on linux.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/4e6fdea0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/4e6fdea0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/4e6fdea0

Branch: refs/heads/develop
Commit: 4e6fdea080ce3472a7af4af4e988807ee40bcc4c
Parents: d1259ed
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Nov 1 12:02:25 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Nov 1 12:02:25 2016 -0700

----------------------------------------------------------------------
 net/oic/src/port/mynewt/abort.c       |  8 +++++++-
 net/oic/src/port/mynewt/ble_adaptor.c |  2 +-
 net/oic/src/port/mynewt/ip_adaptor.c  | 12 +++++++-----
 3 files changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/4e6fdea0/net/oic/src/port/mynewt/abort.c
----------------------------------------------------------------------
diff --git a/net/oic/src/port/mynewt/abort.c b/net/oic/src/port/mynewt/abort.c
index e7be3ad..49bcf63 100644
--- a/net/oic/src/port/mynewt/abort.c
+++ b/net/oic/src/port/mynewt/abort.c
@@ -20,6 +20,12 @@
 #include "../oc_assert.h"
 #include <assert.h>
 
-void abort_impl(void) {
+#ifndef abort_impl
+
+void
+abort_impl(void)
+{
     assert(0);
 }
+
+#endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/4e6fdea0/net/oic/src/port/mynewt/ble_adaptor.c
----------------------------------------------------------------------
diff --git a/net/oic/src/port/mynewt/ble_adaptor.c b/net/oic/src/port/mynewt/ble_adaptor.c
index e4e0e0f..6963249 100644
--- a/net/oic/src/port/mynewt/ble_adaptor.c
+++ b/net/oic/src/port/mynewt/ble_adaptor.c
@@ -166,7 +166,7 @@ oc_attempt_rx_gatt(void)
     message->endpoint.flags = GATT;
     message->endpoint.bt_addr.conn_handle = conn_handle;
     message->length = pkt->omp_len;
-    LOG("Successfully rx length %lu\n", message->length);
+    LOG("Successfully rx length %lu\n", (unsigned long)message->length);
     return message;
 
     /* add the addr info to the message */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/4e6fdea0/net/oic/src/port/mynewt/ip_adaptor.c
----------------------------------------------------------------------
diff --git a/net/oic/src/port/mynewt/ip_adaptor.c b/net/oic/src/port/mynewt/ip_adaptor.c
index e05f606..646a5b0 100644
--- a/net/oic/src/port/mynewt/ip_adaptor.c
+++ b/net/oic/src/port/mynewt/ip_adaptor.c
@@ -64,7 +64,8 @@ oc_send_buffer_ip_int(oc_message_t *message, int mcast)
     struct os_mbuf m;
     int rc;
 
-    LOG("oc_transport_ip attempt send buffer %lu\n", message->length);
+    LOG("oc_transport_ip attempt send buffer %lu\n",
+        (unsigned long)message->length);
 
     to.msin6_len = sizeof(to);
     to.msin6_family = MN_AF_INET6;
@@ -98,14 +99,14 @@ oc_send_buffer_ip_int(oc_message_t *message, int mcast)
             rc = mn_sendto(ucast, &m, (struct mn_sockaddr *) &to);
             if (rc != 0) {
                 ERROR("Failed sending buffer %lu on itf %d\n",
-                      message->length, to.msin6_scope_id);
+                      (unsigned long)message->length, to.msin6_scope_id);
             }
         }
     } else {
         rc = mn_sendto(ucast, &m, (struct mn_sockaddr *) &to);
         if (rc != 0) {
             ERROR("Failed sending buffer %lu on itf %d\n",
-                  message->length, to.msin6_scope_id);
+                  (unsigned long)message->length, to.msin6_scope_id);
         }
     }
     oc_message_unref(message);
@@ -170,7 +171,8 @@ oc_attempt_rx_ip_sock(struct mn_socket * rxsock) {
     message->endpoint.ipv6_addr.scope = from.msin6_scope_id;
     message->endpoint.ipv6_addr.port = ntohs(from.msin6_port);
 
-    LOG("Successfully rx from %p len %lu\n", rxsock, message->length);
+    LOG("Successfully rx from %p len %lu\n", rxsock,
+        (unsigned long)message->length);
     return message;
 
     /* add the addr info to the message */
@@ -208,7 +210,7 @@ union mn_socket_cb oc_sock_cbs = {
 void
 oc_socks_readable(void *cb_arg, int err)
 {
-    os_eventq_put(&oc_evq_get(), &oc_sock_read_event);
+    os_eventq_put(oc_evq_get(), &oc_sock_read_event);
 }
 
 void