W32: Remove our poor emulation of poll() from the w32 build.
This commit is contained in:
@@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
#define EXTERN __declspec( dllexport )
|
#define EXTERN __declspec( dllexport )
|
||||||
EXTERN int poll(struct pollfd *fds, int nfsd, int timeout);
|
|
||||||
#else
|
#else
|
||||||
#define EXTERN
|
#define EXTERN
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ iscsi_writesame10_sync
|
|||||||
iscsi_writesame16_sync
|
iscsi_writesame16_sync
|
||||||
iscsi_scsi_task_cancel
|
iscsi_scsi_task_cancel
|
||||||
iscsi_scsi_cancel_all_tasks
|
iscsi_scsi_cancel_all_tasks
|
||||||
poll
|
|
||||||
scsi_task_add_data_in_buffer
|
scsi_task_add_data_in_buffer
|
||||||
scsi_sense_key_str
|
scsi_sense_key_str
|
||||||
scsi_sense_ascq_str
|
scsi_sense_ascq_str
|
||||||
|
|||||||
31
lib/socket.c
31
lib/socket.c
@@ -574,34 +574,3 @@ int iscsi_set_tcp_keepalive(struct iscsi_context *iscsi, int idle, int count, in
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WIN32)
|
|
||||||
int poll(struct pollfd *fds, int nfsd, int timeout)
|
|
||||||
{
|
|
||||||
fd_set rfds, wfds, efds;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
FD_ZERO(&rfds);
|
|
||||||
FD_ZERO(&wfds);
|
|
||||||
FD_ZERO(&efds);
|
|
||||||
if (fds->events & POLLIN) {
|
|
||||||
FD_SET(fds->fd, &rfds);
|
|
||||||
}
|
|
||||||
if (fds->events & POLLOUT) {
|
|
||||||
FD_SET(fds->fd, &wfds);
|
|
||||||
}
|
|
||||||
FD_SET(fds->fd, &efds);
|
|
||||||
select(fds->fd + 1, &rfds, &wfds, &efds, NULL);
|
|
||||||
fds->revents = 0;
|
|
||||||
if (FD_ISSET(fds->fd, &rfds)) {
|
|
||||||
fds->revents |= POLLIN;
|
|
||||||
}
|
|
||||||
if (FD_ISSET(fds->fd, &wfds)) {
|
|
||||||
fds->revents |= POLLOUT;
|
|
||||||
}
|
|
||||||
if (FD_ISSET(fds->fd, &efds)) {
|
|
||||||
fds->revents |= POLLHUP;
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user