aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-15 17:43:59 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-15 17:43:59 +0000
commit0b321028e4e0939ea8c4d39fa53bc34b19bc14c8 (patch)
tree492f084565e42c52b051a74dee2907d20cf5dde9 /include
parentb9f2b5a4aa961a7389a42e56b74dae5f293bb2dd (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@164343 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/autoconfig.h.in3
-rw-r--r--include/asterisk/channel.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index 163d132df..b05c0ff32 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -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
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index aa1ee2d07..05e44449c 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -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;