diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-24 03:20:24 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-24 03:20:24 +0000 |
commit | e0fefc85e31fb975c65d9d9e581c0701f95e2e61 (patch) | |
tree | b1438325eb47025dd69db1fc76d96a559ba25bae /include/asterisk | |
parent | d0e3394182de9145f418608e6a2da8c8da61251a (diff) |
Solaris compatibility fixes
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@288636 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/channel.h | 13 | ||||
-rw-r--r-- | include/asterisk/compat.h | 4 |
2 files changed, 4 insertions, 13 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 750f56690..fb0046782 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -1399,19 +1399,6 @@ static inline int ast_fdisset(struct pollfd *pfds, int fd, int max, int *start) return 0; } -#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; - tvdiff->tv_usec = tvend->tv_usec - tvstart->tv_usec; - if (tvdiff->tv_usec < 0) { - tvdiff->tv_sec --; - tvdiff->tv_usec += 1000000; - } - -} -#endif - #define CHECK_BLOCKING(c) do { \ if (ast_test_flag(c, AST_FLAG_BLOCKING)) {\ if (option_debug) \ diff --git a/include/asterisk/compat.h b/include/asterisk/compat.h index d91ce4a1a..2168f8c36 100644 --- a/include/asterisk/compat.h +++ b/include/asterisk/compat.h @@ -62,6 +62,10 @@ int unsetenv(const char *name); int vasprintf(char **strp, const char *fmt, va_list ap); #endif +#ifndef HAVE_TIMERSUB +void timersub(struct timeval *tvend, struct timeval *tvstart, struct timeval *tvdiff); +#endif + #ifndef HAVE_STRLCAT size_t strlcat(char *dst, const char *src, size_t siz) attribute_deprecated; #endif |