Index: libsofia-sip-ua/nta/nta.c
===================================================================
--- libsofia-sip-ua/nta/nta.c   (revision 4329)
+++ libsofia-sip-ua/nta/nta.c   (revision 4336)
@@ -357,8 +357,10 @@ nta_agent_t *nta_agent_create(su_root_t 
   nta_agent_t *agent;
   ta_list ta;
 
-  if (root == NULL)
-    return su_seterrno(EINVAL), NULL;
+  if (root == NULL) {
+    su_seterrno(EINVAL);
+   return NULL;
+  }
 
   ta_start(ta, tag, value);
 
@@ -776,7 +778,7 @@ su_duration_t set_timeout(nta_agent_t *a
 
 /** Return current timeval. */
 static
-su_time_t agent_now(nta_agent_t const *agent)
+su_time_t agent_now(nta_agent_t *agent)
 {
   return agent->sa_millisec ? agent->sa_now : su_now();
 }
@@ -986,7 +988,7 @@ int agent_set_params(nta_agent_t *agent,
     agent->sa_algorithm = su_strdup(home, algorithm);
 
   if (str0cmp(sigcomp, agent->sa_sigcomp_options)) {
-    char const * const *l = NULL;
+    const msg_param_t *l = NULL;
     char *s = su_strdup(home, sigcomp);
     char *s1 = su_strdup(home, s), *s2 = s1;
 
@@ -1251,8 +1253,10 @@ char const *nta_agent_newtag(su_home_t *
 {
   char tag[(8 * 8 + 4)/ 5 + 1];
 
-  if (sa == NULL)
-    return su_seterrno(EINVAL), NULL;
+  if (sa == NULL) {
+    su_seterrno(EINVAL);
+   return NULL;
+  }
 
   /* XXX - use a cryptographically safe func here? */
   sa->sa_tags += NTA_TAG_PRIME;
@@ -2574,8 +2578,10 @@ msg_t *nta_msg_create(nta_agent_t *agent
 {
   msg_t *msg;
 
-  if (agent == NULL)
-    return su_seterrno(EINVAL), NULL;
+  if (agent == NULL) {
+    su_seterrno(EINVAL);
+   return NULL;
+  }
 
   msg = msg_create(agent->sa_mclass, agent->sa_flags | flags);
 
@@ -3305,8 +3311,10 @@ nta_leg_t *nta_leg_tcreate(nta_agent_t *
   su_home_t *home;
   url_t *url;
 
-  if (agent == NULL)
-    return su_seterrno(EINVAL), NULL;
+  if (agent == NULL) {
+    su_seterrno(EINVAL);
+   return NULL;
+  }
 
   ta_start(ta, tag, value);
 
@@ -3606,8 +3614,10 @@ void nta_leg_bind(nta_leg_t *leg,
  */
 char const *nta_leg_tag(nta_leg_t *leg, char const *tag)
 {
-  if (!leg || !leg->leg_local)
-    return su_seterrno(EINVAL), NULL;
+  if (!leg || !leg->leg_local) {
+    su_seterrno(EINVAL);
+   return NULL;
+  }
 
   if (tag && strchr(tag, '='))
     tag = strchr(tag, '=') + 1;
@@ -3907,8 +3917,10 @@ nta_leg_t *nta_leg_by_dialog(nta_agent_t
   url_t url0[1];
   nta_leg_t *leg;
 
-  if (!agent || !call_id)
-    return su_seterrno(EINVAL), NULL;
+  if (!agent || !call_id) {
+    su_seterrno(EINVAL);
+   return NULL;
+  }
 
   if (request_uri == NULL) {
     url = NULL;
@@ -4250,18 +4262,24 @@ nta_incoming_t *nta_incoming_default(nta
   su_home_t *home;
   nta_incoming_t *irq;
 
-  if (agent == NULL)
-    return su_seterrno(EFAULT), NULL;
-  if (agent->sa_default_incoming)
-    return su_seterrno(EEXIST), NULL;
+  if (agent == NULL) {
+    su_seterrno(EFAULT);
+   return NULL;
+  }
+  if (agent->sa_default_incoming) {
+    su_seterrno(EEXIST);
+   return NULL;
+  }
 
   msg = nta_msg_create(agent, 0);
   if (!msg)
     return NULL;
 
   irq = su_zalloc(home = msg_home(msg), sizeof(*irq));
-  if (!irq)
-    return (void)msg_destroy(msg), NULL;
+  if (!irq) {
+    msg_destroy(msg);
+   return NULL;
+  }
 
   irq->irq_home = home;
   irq->irq_request = NULL;
@@ -4318,8 +4336,10 @@ nta_incoming_t *nta_incoming_create(nta_
   if (sip == NULL)
     sip = sip_object(msg);
 
-  if (agent == NULL || sip == NULL || !sip->sip_request || !sip->sip_cseq)
-    return msg_destroy(msg), NULL;
+  if (agent == NULL || sip == NULL || !sip->sip_request || !sip->sip_cseq) {
+    msg_destroy(msg);
+   return NULL;
+  }
 
   ta_start(ta, tag, value);
   
@@ -4811,11 +4831,15 @@ void nta_incoming_bind(nta_incoming_t *i
  */
 char const *nta_incoming_tag(nta_incoming_t *irq, char const *tag)
 {
-  if (!irq)
-    return su_seterrno(EFAULT), NULL;
+  if (!irq) {
+    su_seterrno(EFAULT);
+   return NULL;
+  }
 
-  if (irq->irq_default)
-    return su_seterrno(EINVAL), NULL;
+  if (irq->irq_default) {
+    su_seterrno(EINVAL);
+   return NULL;
+  }
 
   if (tag && strchr(tag, '='))
     tag = strchr(tag, '=') + 1;
Index: libsofia-sip-ua/su/sofia-sip/su_debug.h
===================================================================
--- libsofia-sip-ua/su/sofia-sip/su_debug.h (revision 4329)
+++ libsofia-sip-ua/su/sofia-sip/su_debug.h (revision 4336)
@@ -76,7 +76,7 @@ SOFIAPUBVAR su_log_t SU_LOG[];
 #define SU_DEBUG_DEF(level) \
   static SU_INLINE void su_debug_##level(char const *fmt, ...) \
     __attribute__ ((__format__ (printf, 1, 2))); \
-  void su_debug_##level(char const *fmt, ...) \
+  static SU_INLINE void su_debug_##level(char const *fmt, ...) \
     { va_list ap; va_start(ap, fmt); su_vllog(SU_LOG, level, fmt, ap); va_end(ap); }
 
 SU_DEBUG_DEF(0)
Index: libsofia-sip-ua/sip/sofia-sip/sip_util.h
===================================================================
--- libsofia-sip-ua/sip/sofia-sip/sip_util.h    (revision 4329)
+++ libsofia-sip-ua/sip/sofia-sip/sip_util.h    (revision 4336)
@@ -54,7 +54,7 @@ SOFIAPUBFUN char const *sip_params_find(
 SOFIAPUBFUN int sip_params_add(su_home_t *sh, 
                   sip_param_t **pparams,
                   char const *param);
-SOFIAPUBFUN int sip_params_cmp(sip_param_t const a[], sip_param_t const b[]);
+SOFIAPUBFUN int sip_params_cmp(char const * const a[], char const * const b[]);
 SOFIAPUBFUN int sip_params_replace(su_home_t *,
                   sip_param_t **pparams, char const *param);
 
Index: libsofia-sip-ua/ipt/sofia-sip/string0.h
===================================================================
--- libsofia-sip-ua/ipt/sofia-sip/string0.h (revision 4329)
+++ libsofia-sip-ua/ipt/sofia-sip/string0.h (revision 4336)
@@ -46,7 +46,7 @@ SOFIA_BEGIN_DECLS
 #if SU_HAVE_INLINE
 su_inline
 #else
-SOFIAPUBFUN
+static SOFIAPUBFUN
 #endif
 int 
   str0cmp(char const *a, char const *b),
@@ -64,6 +64,7 @@ strnspn(char const *s, size_t size, char
   strncspn(char const *s, size_t ssize, char const *reject);
 
 #if SU_HAVE_INLINE
+su_inline
 int str0cmp(char const *a, char const *b)
 {
   if (a == NULL) a = "";
@@ -71,6 +72,7 @@ int str0cmp(char const *a, char const *b
   return strcmp(a, b);
 }
 
+su_inline
 int str0ncmp(char const *a, char const *b, size_t n)
 {
   if (a == NULL) a = "";
@@ -78,6 +80,7 @@ int str0ncmp(char const *a, char const *
   return strncmp(a, b, n);
 }
 
+su_inline
 int str0casecmp(char const *a, char const *b)
 {
   if (a == NULL) a = "";
@@ -85,6 +88,7 @@ int str0casecmp(char const *a, char cons
   return strcasecmp(a, b);
 }
 
+su_inline
 int str0ncasecmp(char const *a, char const *b, size_t n)
 {
   if (a == NULL) a = "";
@@ -92,6 +96,7 @@ int str0ncasecmp(char const *a, char con
   return strncasecmp(a, b, n);
 }
 
+su_inline
 size_t strnspn(char const *s, size_t ssize, char const *term)
 {
   size_t n;
@@ -123,6 +128,7 @@ size_t strnspn(char const *s, size_t ssi
   return n;
 }
 
+su_inline
 size_t strncspn(char const *s, size_t ssize, char const *reject)
 {
   size_t n;
Index: libsofia-sip-ua/tport/tport_type_sctp.c
===================================================================
--- libsofia-sip-ua/tport/tport_type_sctp.c (revision 4329)
+++ libsofia-sip-ua/tport/tport_type_sctp.c (revision 4336)
@@ -57,6 +57,12 @@
 #undef MAX_STREAMS
 #define MAX_STREAMS MAX_STREAMS
 
+/* Missing socket symbols */
+#ifndef SOL_SCTP
+#define SOL_SCTP IPPROTO_SCTP
+#endif
+
+
 enum { MAX_STREAMS = 1 };
 typedef struct tport_sctp_t
 {
@@ -90,8 +96,8 @@ static int tport_sctp_init_socket(tport_
                  int socket,
                  char const **return_reason);
 static int tport_recv_sctp(tport_t *self);
-static int tport_send_sctp(tport_t const *self, msg_t *msg,
-              msg_iovec_t iov[], int iovused);
+static ssize_t tport_send_sctp(tport_t const *self, msg_t *msg,
+              msg_iovec_t iov[], size_t iovused);
 
 tport_vtable_t const tport_sctp_client_vtable =
 {
@@ -251,8 +257,8 @@ int tport_recv_sctp(tport_t *self)
   return 2;
 }
 
-static int tport_send_sctp(tport_t const *self, msg_t *msg,
-              msg_iovec_t iov[], int iovused)
+static ssize_t tport_send_sctp(tport_t const *self, msg_t *msg,
+              msg_iovec_t iov[], size_t iovused)
 {
   
 
