summaryrefslogtreecommitdiff
path: root/include/asterisk/channel.h
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-12-14 23:36:30 +0000
committerMark Spencer <markster@digium.com>2004-12-14 23:36:30 +0000
commit9d40b8ee8045660d58281553e34b7f45406951c0 (patch)
tree48694f38698e4ead3840305333816193c7fcd8a0 /include/asterisk/channel.h
parent0f205bb07903a70272e8ae2403afe20ceb06cedc (diff)
Merge slimey's Solaris compatibility (with small mods) (bug #2740)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/channel.h')
-rwxr-xr-xinclude/asterisk/channel.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 7c129f73c..28c566364 100755
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -829,6 +829,19 @@ static inline int ast_fdisset(struct pollfd *pfds, int fd, int max, int *start)
return 0;
}
+#ifdef SOLARIS
+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
+
//! Waits for activity on a group of channels
/*!
* \param nfds the maximum number of file descriptors in the sets