diff --git a/CHANGES b/CHANGES index 2861256..a029d3d 100644 --- a/CHANGES +++ b/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: diff --git a/filan.c b/filan.c index 4cfa3b9..563bee9 100644 --- a/filan.c +++ b/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); diff --git a/sysutils.c b/sysutils.c index a4ed08f..05b8206 100644 --- a/sysutils.c +++ b/sysutils.c @@ -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 */