From e9802a10730345f734adff31a6c023690878c883 Mon Sep 17 00:00:00 2001 From: Louai Al-Khanji Date: Wed, 3 Feb 2016 23:02:28 -0800 Subject: [PATCH] tst_qeventloop: replace select with poll Change-Id: Ib2b71696e24249b0b13bb925a7bb627ef09f2dff Reviewed-by: Thiago Macieira --- tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp index 270be53f0c..aff04afe08 100644 --- a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp +++ b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp @@ -425,11 +425,8 @@ public slots: dataSent = serverSocket->waitForBytesWritten(-1); if (dataSent) { - fd_set fdread; - int fd = socket->socketDescriptor(); - FD_ZERO(&fdread); - FD_SET(fd, &fdread); - dataReadable = (1 == qt_safe_select(fd + 1, &fdread, 0, 0, 0)); + pollfd pfd = qt_make_pollfd(socket->socketDescriptor(), POLLIN); + dataReadable = (1 == qt_safe_poll(&pfd, 1, nullptr)); } if (!dataReadable) {