mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-10 06:49:40 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user