aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortuexen <tuexen@9df1edf5-d72c-5b5f-11c0-5f5209eb73f7>2011-11-03 20:55:29 +0000
committertuexen <tuexen@9df1edf5-d72c-5b5f-11c0-5f5209eb73f7>2011-11-03 20:55:29 +0000
commitf3fe5e54a9cd07f16786390de9e864b215ad4a99 (patch)
tree72436a43512bec6701b303031a5b221e0a8fdfe1
parentfffa95fb52d9f20bb4521c4378f5e672c6982030 (diff)
downloadusrsctp-f3fe5e54a9cd07f16786390de9e864b215ad4a99.tar.gz
Get it compiling statically and put in debug symbols. Still crashing
on Lion. It seems to be a stack issue. Not sure what the problem is.
-rw-r--r--configure.in2
-rwxr-xr-xusrsctplib/netinet/sctp_bsd_addr.c2
-rwxr-xr-xusrsctplib/netinet/sctp_os_userspace.h12
3 files changed, 15 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 1a4d95d5..6dbce51a 100644
--- a/configure.in
+++ b/configure.in
@@ -5,7 +5,7 @@ AC_PROG_CC
AC_PROG_LIBTOOL
AC_CANONICAL_HOST
-CFLAGS="$CFLAGS -D__Userspace__ -DSCTP_SIMPLE_ALLOCATOR"
+CFLAGS="$CFLAGS -g -O0 -D__Userspace__ -DSCTP_SIMPLE_ALLOCATOR"
case $host_os in
darwin*)
diff --git a/usrsctplib/netinet/sctp_bsd_addr.c b/usrsctplib/netinet/sctp_bsd_addr.c
index 6794a422..a5c1ca2a 100755
--- a/usrsctplib/netinet/sctp_bsd_addr.c
+++ b/usrsctplib/netinet/sctp_bsd_addr.c
@@ -123,6 +123,7 @@ sctp_iterator_thread(void *v)
#else
while ((sctp_it_ctl.iterator_flags & SCTP_ITERATOR_MUST_EXIT) == 0) {
#endif
+#if !defined(__Userspace__)
msleep(&sctp_it_ctl.iterator_running,
#if defined(__FreeBSD__)
&sctp_it_ctl.ipi_iterator_wq_mtx,
@@ -130,6 +131,7 @@ sctp_iterator_thread(void *v)
sctp_it_ctl.ipi_iterator_wq_mtx,
#endif
0, "waiting_for_work", 0);
+#endif
#if !defined(__FreeBSD__)
if (sctp_it_ctl.iterator_flags & SCTP_ITERATOR_MUST_EXIT) {
break;
diff --git a/usrsctplib/netinet/sctp_os_userspace.h b/usrsctplib/netinet/sctp_os_userspace.h
index 95c8ad38..1e2bf0a9 100755
--- a/usrsctplib/netinet/sctp_os_userspace.h
+++ b/usrsctplib/netinet/sctp_os_userspace.h
@@ -776,4 +776,16 @@ sctp_get_mbuf_for_msg(unsigned int space_needed,
} while (0)
#endif
+#ifndef timevalsub
+#define timevalsub(tp1, tp2) \
+ do { \
+ (tp1)->tv_sec -= (tp2)->tv_sec; \
+ (tp1)->tv_usec -= (tp2)->tv_usec; \
+ if ((tp1)->tv_usec < 0) { \
+ (tp1)->tv_sec--; \
+ (tp1)->tv_usec += 1000000; \
+ } \
+ } while (0)
+#endif
+
#endif