[asterisk-commits] tilghman: branch 1.4 r288636 - in /branches/1.4: include/asterisk/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 23 22:20:31 CDT 2010
Author: tilghman
Date: Thu Sep 23 22:20:24 2010
New Revision: 288636
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=288636
Log:
Solaris compatibility fixes
Modified:
branches/1.4/include/asterisk/channel.h
branches/1.4/include/asterisk/compat.h
branches/1.4/main/asterisk.exports
branches/1.4/main/strcompat.c
Modified: branches/1.4/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/include/asterisk/channel.h?view=diff&rev=288636&r1=288635&r2=288636
==============================================================================
--- branches/1.4/include/asterisk/channel.h (original)
+++ branches/1.4/include/asterisk/channel.h Thu Sep 23 22:20:24 2010
@@ -1399,19 +1399,6 @@
return 0;
}
-#ifndef HAVE_TIMERSUB
-static inline void timersub(struct timeval *tvend, struct timeval *tvstart, struct timeval *tvdiff)
-{
- tvdiff->tv_sec = tvend->tv_sec - tvstart->tv_sec;
- tvdiff->tv_usec = tvend->tv_usec - tvstart->tv_usec;
- if (tvdiff->tv_usec < 0) {
- tvdiff->tv_sec --;
- tvdiff->tv_usec += 1000000;
- }
-
-}
-#endif
-
#define CHECK_BLOCKING(c) do { \
if (ast_test_flag(c, AST_FLAG_BLOCKING)) {\
if (option_debug) \
Modified: branches/1.4/include/asterisk/compat.h
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/include/asterisk/compat.h?view=diff&rev=288636&r1=288635&r2=288636
==============================================================================
--- branches/1.4/include/asterisk/compat.h (original)
+++ branches/1.4/include/asterisk/compat.h Thu Sep 23 22:20:24 2010
@@ -60,6 +60,10 @@
#if !defined(HAVE_VASPRINTF) && !defined(__AST_DEBUG_MALLOC)
int vasprintf(char **strp, const char *fmt, va_list ap);
+#endif
+
+#ifndef HAVE_TIMERSUB
+void timersub(struct timeval *tvend, struct timeval *tvstart, struct timeval *tvdiff);
#endif
#ifndef HAVE_STRLCAT
Modified: branches/1.4/main/asterisk.exports
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/asterisk.exports?view=diff&rev=288636&r1=288635&r2=288636
==============================================================================
--- branches/1.4/main/asterisk.exports (original)
+++ branches/1.4/main/asterisk.exports Thu Sep 23 22:20:24 2010
@@ -38,6 +38,7 @@
asprintf;
strtoq;
getloadavg;
+ timersub;
strlcat;
strlcpy;
local:
Modified: branches/1.4/main/strcompat.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/strcompat.c?view=diff&rev=288636&r1=288635&r2=288636
==============================================================================
--- branches/1.4/main/strcompat.c (original)
+++ branches/1.4/main/strcompat.c Thu Sep 23 22:20:24 2010
@@ -171,6 +171,19 @@
return size;
}
#endif /* !defined(HAVE_VASPRINTF) && !defined(__AST_DEBUG_MALLOC) */
+
+#ifndef HAVE_TIMERSUB
+void timersub(struct timeval *tvend, struct timeval *tvstart, struct timeval *tvdiff)
+{
+ tvdiff->tv_sec = tvend->tv_sec - tvstart->tv_sec;
+ tvdiff->tv_usec = tvend->tv_usec - tvstart->tv_usec;
+ if (tvdiff->tv_usec < 0) {
+ tvdiff->tv_sec --;
+ tvdiff->tv_usec += 1000000;
+ }
+
+}
+#endif
/*
* Based on Code from bsd-asprintf from OpenSSH
More information about the asterisk-commits
mailing list