diff options
author | Brian Havard <bjh@apache.org> | 2010-04-13 13:07:29 +0200 |
---|---|---|
committer | Brian Havard <bjh@apache.org> | 2010-04-13 13:07:29 +0200 |
commit | c6646ca32507c07eced82f0d5106ac063272ee2c (patch) | |
tree | 3fd7481a1d2c8390ac2a09220eca81c637c33284 /modules/proxy | |
parent | Trivial grammatical tweak. (diff) | |
download | apache2-c6646ca32507c07eced82f0d5106ac063272ee2c.tar.xz apache2-c6646ca32507c07eced82f0d5106ac063272ee2c.zip |
Fix backward compatibility with APR versions less than 2.0 which don't have
apr_socket_wait().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@933547 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy')
-rw-r--r-- | modules/proxy/mod_proxy_fdpass.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/proxy/mod_proxy_fdpass.c b/modules/proxy/mod_proxy_fdpass.c index bac014fcee..542dfb3942 100644 --- a/modules/proxy/mod_proxy_fdpass.c +++ b/modules/proxy/mod_proxy_fdpass.c @@ -24,6 +24,12 @@ #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; @@ -73,7 +79,12 @@ static apr_status_t socket_connect_un(apr_socket_t *sock, 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; } |