@@ -33,7 +33,7 @@
#include "usock.h"
#include "utils.h"
-static void usock_set_flags(int sock, unsigned int type)
+static void usock_set_flags(int sock, int type)
{
if (!(type & USOCK_NOCLOEXEC))
fcntl(sock, F_SETFD, fcntl(sock, F_GETFD) | FD_CLOEXEC);
@@ -42,7 +42,7 @@ static void usock_set_flags(int sock, unsigned int type)
fcntl(sock, F_SETFL, fcntl(sock, F_GETFL) | O_NONBLOCK);
}
-static int usock_connect(int type, struct sockaddr *sa, int sa_len, int family, int socktype, bool server)
+static int usock_connect(int type, struct sockaddr *sa, socklen_t sa_len, int family, int socktype, bool server)
{
int sock;
@@ -103,7 +103,7 @@ usock_inet_notimeout(int type, struct addrinfo *result, void *addr)
return -1;
}
-static int poll_restart(struct pollfd *fds, int nfds, int timeout)
+static int poll_restart(struct pollfd *fds, nfds_t nfds, int timeout)
{
struct timespec ts, cur;
int msec = timeout % 1000;