Commit 65686b58 authored by Kai Blin's avatar Kai Blin Committed by Alexandre Julliard

netapi32: Revert "janitorial: Use poll() instead of select()."

As Juan Lang pointed out, fd is a SOCKET here and the netapi32 call to select calls ws2_32.WS_select(), which uses poll internally already.
parent 14987e40
......@@ -67,15 +67,6 @@
#include "config.h"
#include <stdarg.h>
#ifdef HAVE_POLL_H
#include <poll.h>
#endif
#ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#include "winsock2.h"
#include "windef.h"
......@@ -311,12 +302,13 @@ static UCHAR NetBTWaitForNameResponse(const NetBTAdapter *adapter, SOCKET fd,
while (!found && ret == NRC_GOODRET && (now = GetTickCount()) < waitUntil)
{
DWORD msToWait = waitUntil - now;
struct pollfd pfd;
struct fd_set fds;
struct timeval timeout = { msToWait / 1000, msToWait % 1000 };
int r;
pfd.fd = fd;
pfd.events = POLLIN;
r = poll(&pfd, 1, msToWait);
FD_ZERO(&fds);
FD_SET(fd, &fds);
r = select(fd + 1, &fds, NULL, NULL, &timeout);
if (r < 0)
ret = NRC_SYSTEM;
else if (r == 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment