diff options
Diffstat (limited to 'main/poll.c')
-rw-r--r-- | main/poll.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/main/poll.c b/main/poll.c index 823d0cbd4..bb93125a6 100644 --- a/main/poll.c +++ b/main/poll.c @@ -71,6 +71,8 @@ Includes \*---------------------------------------------------------------------------*/ +#include "asterisk.h" + #include <unistd.h> /* standard Unix definitions */ #include <sys/types.h> /* system types */ #include <sys/time.h> /* time definitions */ @@ -79,6 +81,8 @@ #include "asterisk/poll-compat.h" /* this package */ +#ifdef AST_POLL_COMPAT + /*---------------------------------------------------------------------------*\ Macros \*---------------------------------------------------------------------------*/ @@ -87,7 +91,6 @@ #define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif - /*---------------------------------------------------------------------------*\ Private Functions \*---------------------------------------------------------------------------*/ @@ -203,7 +206,7 @@ static struct timeval *map_timeout return pResult; } - + static void map_select_results #if __STDC__ > 0 (struct pollfd *pArray, @@ -246,22 +249,12 @@ static void map_select_results return; } - + /*---------------------------------------------------------------------------*\ Public Functions \*---------------------------------------------------------------------------*/ -int poll - -#if __STDC__ > 0 - (struct pollfd *pArray, unsigned long n_fds, int timeout) -#else - (pArray, n_fds, timeout) - struct pollfd *pArray; - unsigned long n_fds; - int timeout; -#endif - +int ast_internal_poll(struct pollfd *pArray, unsigned long n_fds, int timeout) { fd_set read_descs; /* input file descs */ fd_set write_descs; /* output file descs */ @@ -295,3 +288,5 @@ int poll return ready_descriptors; } + +#endif /* AST_POLL_COMPAT */ |