diff --git a/lib_acl/include/net/acl_listen.h b/lib_acl/include/net/acl_listen.h index b02235e76..daa1f6fbb 100644 --- a/lib_acl/include/net/acl_listen.h +++ b/lib_acl/include/net/acl_listen.h @@ -118,7 +118,7 @@ ACL_API int acl_fifo_listen(const char *path, int permissions, int mode); #if defined(_WIN32) || defined(_WIN64) typedef SOCKET (__stdcall *acl_accept_fn)(SOCKET, struct sockaddr*, socklen_t*); #else -typedef int (acl_accept_fn)(int, struct sockaddr*, socklen_t*); +typedef int (*acl_accept_fn)(int, struct sockaddr*, socklen_t*); #endif ACL_API void acl_set_accept(acl_accept_fn fn); diff --git a/lib_acl/src/stdlib/iostuff/acl_read_wait.c b/lib_acl/src/stdlib/iostuff/acl_read_wait.c index 1ce4811fe..7dc7ec7dd 100644 --- a/lib_acl/src/stdlib/iostuff/acl_read_wait.c +++ b/lib_acl/src/stdlib/iostuff/acl_read_wait.c @@ -251,7 +251,7 @@ static acl_poll_fn __sys_poll = poll; void acl_set_poll(acl_poll_fn fn) { - __sys_poll == fn; + __sys_poll = fn; } int acl_read_poll_wait(ACL_SOCKET fd, int delay) diff --git a/lib_fiber/c/src/hook/select.c b/lib_fiber/c/src/hook/select.c index 5a3d14c9f..b2427f90e 100644 --- a/lib_fiber/c/src/hook/select.c +++ b/lib_fiber/c/src/hook/select.c @@ -116,7 +116,7 @@ static struct pollfd *pfds_create(int *nfds, fd_set *readfds, int fd; struct pollfd *fds; - fds = (struct pollfd *) calloc(*nfds + , sizeof(struct pollfd)); + fds = (struct pollfd *) calloc(*nfds + 1, sizeof(struct pollfd)); for (fd = 0; fd < *nfds; fd++) { if (readfds && FD_ISSET(fd, readfds)) {