Use autoconf logic to determine whether the system has timersub or not. Do not blindly assume Solaris does not.

(closes issue #13838)
Reported by: ano


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@164343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2008-12-15 17:43:59 +00:00
parent dfa5f7c4b4
commit b80ffd6d26
4 changed files with 72 additions and 6 deletions

View File

@@ -498,6 +498,9 @@
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
/* Define to 1 if your system has timersub in time.h */
#undef HAVE_TIMERSUB
/* Define to indicate the ${TINFO_DESCRIP} library */
#undef HAVE_TINFO

View File

@@ -1315,7 +1315,7 @@ static inline int ast_fdisset(struct pollfd *pfds, int fd, int max, int *start)
return 0;
}
#ifdef SOLARIS
#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;