** libgnutls: Replaced writev() system call with sendmsg().
+** libgnutls: Replaced select() system call with poll() on POSIX systems.
+
** certtool: Added the --provable option.
** API and ABI modifications:
@item sendmsg
@item read (to read from /dev/urandom)
@item getrandom (this is Linux-kernel specific)
-@item select
+@item poll
@end itemize
As well as any calls needed for memory allocation to work. Note however, that GnuTLS
# define pCertEnumCRLsInStore CertEnumCRLsInStore
# endif
-#else /* _WIN32 */
-# include <sys/select.h>
+#else /* !_WIN32 */
+
+# include <poll.h>
# ifdef HAVE_PTHREAD_LOCKS
# include <pthread.h>
**/
int gnutls_system_recv_timeout(gnutls_transport_ptr_t ptr, unsigned int ms)
{
- fd_set rfds;
- struct timeval _tv, *tv = NULL;
int ret;
int fd = GNUTLS_POINTER_TO_INT(ptr);
+#ifndef _WIN32
+ int timeo;
+ struct pollfd pfd;
+
+ pfd.fd = fd;
+ pfd.events = POLLIN;
+ pfd.revents = 0;
+
+ if (ms == GNUTLS_INDEFINITE_TIMEOUT)
+ timeo = -1;
+ else
+ timeo = ms;
+ ret = poll(&pfd, 1, timeo);
+#else
+ fd_set rfds;
+ struct timeval _tv, *tv = NULL;
FD_ZERO(&rfds);
FD_SET(fd, &rfds);
}
ret = select(fd + 1, &rfds, NULL, NULL, tv);
+#endif
if (ret <= 0)
return ret;
int add_system_trust(gnutls_x509_trust_list_t list, unsigned int tl_flags,
unsigned int tl_vflags)
{
- char path[GNUTLS_PATH_MAX];
unsigned int i;
int r = 0;
ADD_SYSCALL(rt_sigprocmask, 0);
/* used in to detect reading timeouts */
- ADD_SYSCALL(select, 0);
- /* in x86, glibc uses _newselect() */
- ADD_SYSCALL(_newselect, 0);
+ ADD_SYSCALL(poll, 0);
/* for memory allocation */
ADD_SYSCALL(brk, 0);