Merged revisions 288638 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r288638 | tilghman | 2010-09-23 22:39:29 -0500 (Thu, 23 Sep 2010) | 16 lines
  
  Merged revisions 288637 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r288637 | tilghman | 2010-09-23 22:36:01 -0500 (Thu, 23 Sep 2010) | 9 lines
    
    Merged revisions 288636 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r288636 | tilghman | 2010-09-23 22:20:24 -0500 (Thu, 23 Sep 2010) | 2 lines
      
      Solaris compatibility fixes
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2010-09-24 03:41:02 +00:00
parent cfe811bb35
commit f8180257e0
7 changed files with 101 additions and 14 deletions

View File

@@ -169,6 +169,19 @@ int vasprintf(char **strp, const char *fmt, va_list ap)
}
#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
* Copyright (c) 2004 Darren Tucker.