diff --git a/src/libzt.cpp b/src/libzt.cpp index d6fa74c..c19f1e2 100644 --- a/src/libzt.cpp +++ b/src/libzt.cpp @@ -40,6 +40,7 @@ for applications to use. See also: include/libzt.h */ #include #include #include +#include // stack #include "pico_stack.h" @@ -1066,14 +1067,12 @@ int zts_close(ZT_CLOSE_SIG) int zts_poll(ZT_POLL_SIG) { - // struct pollfd *fds, nfds_t nfds, int timeout - return 0; + return poll(fds, nfds, timeout); } int zts_select(ZT_SELECT_SIG) { - // int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout - return 0; + return select(nfds, readfds, writefds, exceptfds, timeout); } int zts_fcntl(ZT_FCNTL_SIG) diff --git a/test/echotest.cpp b/test/echotest.cpp index f0384f0..42a30a9 100644 --- a/test/echotest.cpp +++ b/test/echotest.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include diff --git a/test/selftest.cpp b/test/selftest.cpp index 36b054b..1280338 100644 --- a/test/selftest.cpp +++ b/test/selftest.cpp @@ -39,7 +39,7 @@ #include #include #include - +#include #include #include #include @@ -1069,9 +1069,10 @@ int obscure_api_test() int sock = zts_socket(AF_INET, SOCK_STREAM, 0); int flag = 1; int err = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(int)); - if (err < 0) { - DEBUG_ERROR("error while disabling Nagle's algorithm on socket"); - } + if (err < 0) { + DEBUG_ERROR("error while disabling Nagle's algorithm on socket"); + } + return err; }