diff options
Diffstat (limited to 'main/asterisk.c')
-rw-r--r-- | main/asterisk.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index 23cfbd23a..e8bac98c3 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -121,6 +121,7 @@ int daemon(int, int); /* defined in libresolv of all places */ #include "asterisk/linkedlists.h" #include "asterisk/devicestate.h" #include "asterisk/module.h" +#include "asterisk/poll-compat.h" #include "asterisk/doxyref.h" /* Doxygen documentation */ @@ -1011,7 +1012,7 @@ static void *netconsole(void *vconsole) fds[1].events = POLLIN; fds[1].revents = 0; - res = poll(fds, 2, -1); + res = ast_poll(fds, 2, -1); if (res < 0) { if (errno != EINTR) ast_log(LOG_WARNING, "poll returned < 0: %s\n", strerror(errno)); @@ -1058,7 +1059,7 @@ static void *listener(void *unused) return NULL; fds[0].fd = ast_socket; fds[0].events = POLLIN; - s = poll(fds, 1, -1); + s = ast_poll(fds, 1, -1); pthread_testcancel(); if (s < 0) { if (errno != EINTR) @@ -1920,7 +1921,7 @@ static int ast_el_read_char(EditLine *el, char *cp) fds[1].events = POLLIN; max++; } - res = poll(fds, max, -1); + res = ast_poll(fds, max, -1); if (res < 0) { if (sig_flags.need_quit) break; @@ -2507,7 +2508,7 @@ static void ast_remotecontrol(char *data) fds.fd = ast_consock; fds.events = POLLIN; fds.revents = 0; - while (poll(&fds, 1, 500) > 0) { + while (ast_poll(&fds, 1, 500) > 0) { char buf[512] = "", *curline = buf, *nextline; int not_written = 1; @@ -2842,7 +2843,7 @@ static void *monitor_sig_flags(void *unused) for (;;) { struct pollfd p = { sig_alert_pipe[0], POLLIN, 0 }; int a; - poll(&p, 1, -1); + ast_poll(&p, 1, -1); if (sig_flags.need_reload) { sig_flags.need_reload = 0; ast_module_reload(NULL); |