#include "util_filter.h"
#define APR_WANT_STRFUNC
#include "apr_strings.h"
+#include "apr_version.h"
+#if APR_MAJOR_VERSION < 2
+#include "apr_support.h"
+#endif
module AP_MODULE_DECLARE_DATA reqtimeout_module;
}
/* ... and wait for more */
+#if APR_MAJOR_VERSION < 2
+ rv = apr_wait_for_io_or_timeout(NULL, ccfg->socket, 1);
+#else
rv = apr_socket_wait(ccfg->socket, APR_WAIT_READ);
+#endif
if (rv != APR_SUCCESS)
break;
#error This module only works on unix platforms with the correct OS support
#endif
+#include "apr_version.h"
+#if APR_MAJOR_VERSION < 2
+/* for apr_wait_for_io_or_timeout */
+#include "apr_support.h"
+#endif
+
#include "mod_proxy_fdpass.h"
module AP_MODULE_DECLARE_DATA proxy_fdpass_module;
if ((rv == -1) && (errno == EINPROGRESS || errno == EALREADY)
&& (t > 0)) {
+#if APR_MAJOR_VERSION < 2
+ rv = apr_wait_for_io_or_timeout(NULL, sock, 0);
+#else
rv = apr_socket_wait(sock, APR_WAIT_WRITE);
+#endif
+
if (rv != APR_SUCCESS) {
return rv;
}