mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +00:00
Socat failed to compile when no poll() system call was found
This commit is contained in:
parent
5ebf36038f
commit
72a137c287
3 changed files with 7 additions and 2 deletions
4
CHANGES
4
CHANGES
|
@ -11,6 +11,10 @@ Corrections:
|
|||
This affected version 1.7.3.3 only.
|
||||
Thanks to Ivan J. for reporting this issue.
|
||||
|
||||
Socat failed to compile when no poll() system call was found by
|
||||
configure.
|
||||
Thanks to Jason White for sending a patch.
|
||||
|
||||
####################### V 1.7.3.3:
|
||||
|
||||
Corrections:
|
||||
|
|
2
filan.c
2
filan.c
|
@ -144,6 +144,7 @@ int filan_fd(int fd, FILE *outfile) {
|
|||
|POLLMSG
|
||||
#endif
|
||||
;
|
||||
#if HAVE_POLL
|
||||
if (Poll(&ufds, 1, 0) < 0) {
|
||||
Warn4("poll({%d, %hd, %hd}, 1, 0): %s",
|
||||
ufds.fd, ufds.events, ufds.revents, strerror(errno));
|
||||
|
@ -200,6 +201,7 @@ int filan_fd(int fd, FILE *outfile) {
|
|||
}
|
||||
#endif /* _WITH_SOCKET && defined(MSG_DONTWAIT) */
|
||||
}
|
||||
#endif /* HAVE_POLL */
|
||||
}
|
||||
}
|
||||
fputc('\n', outfile);
|
||||
|
|
|
@ -538,8 +538,8 @@ int xiopoll(struct pollfd fds[], unsigned long nfds, struct timeval *timeout) {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
#if HAVE_POLL
|
||||
{
|
||||
#if HAVE_POLL
|
||||
int ms = 0;
|
||||
if (timeout == NULL) {
|
||||
ms = -1;
|
||||
|
@ -549,7 +549,6 @@ int xiopoll(struct pollfd fds[], unsigned long nfds, struct timeval *timeout) {
|
|||
/*! timeout */
|
||||
return Poll(fds, nfds, ms);
|
||||
#else /* HAVE_POLL */
|
||||
} else {
|
||||
Error("poll() not available");
|
||||
return -1;
|
||||
#endif /* !HAVE_POLL */
|
||||
|
|
Loading…
Reference in a new issue