From 367c567c5f35db202474c8d3f730484538e1fb97 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 9 Feb 2012 13:16:55 +1100 Subject: lib/util: Remove sys_poll as it is no longer needed sys_poll() is only needed if the signal pipe is set up and used, but as no signal handler ever writes to the pipe, this can all be removed. signal based events are now handled via tevent. Andrew Bartlett Signed-off-by: Jeremy Allison --- source3/lib/util_sock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/lib/util_sock.c') diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index dcc41bb699..69e33f7725 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -1604,7 +1604,7 @@ int poll_one_fd(int fd, int events, int timeout, int *revents) int ret; int saved_errno; - fds = talloc_zero_array(talloc_tos(), struct pollfd, 2); + fds = talloc_zero_array(talloc_tos(), struct pollfd, 1); if (fds == NULL) { errno = ENOMEM; return -1; @@ -1612,7 +1612,7 @@ int poll_one_fd(int fd, int events, int timeout, int *revents) fds[0].fd = fd; fds[0].events = events; - ret = sys_poll(fds, 1, timeout); + ret = poll(fds, 1, timeout); /* * Assign whatever poll did, even in the ret<=0 case. -- cgit