diff options
author | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2004-07-26 23:06:45 +0000 |
---|---|---|
committer | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2004-07-26 23:06:45 +0000 |
commit | ffc00530e3d0055659d5f6513290366b932e201e (patch) | |
tree | 55a2f57179463dc710f96864bc19d5ebcc346b0a | |
parent | f15b29348c21f62fc310bd8359845d81410a45f5 (diff) | |
download | libapr-ffc00530e3d0055659d5f6513290366b932e201e.tar.gz |
Since this code only applies to sendfile, make sure that it is properly #ifdef'ed
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65290 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | include/arch/win32/apr_arch_networkio.h | 2 | ||||
-rw-r--r-- | network_io/win32/sockets.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/arch/win32/apr_arch_networkio.h b/include/arch/win32/apr_arch_networkio.h index 015be8d3c..1186a83b2 100644 --- a/include/arch/win32/apr_arch_networkio.h +++ b/include/arch/win32/apr_arch_networkio.h @@ -41,11 +41,13 @@ struct apr_socket_t { int remote_addr_unknown; apr_int32_t netmask; apr_int32_t inherit; +#if APR_HAS_SENDFILE /* As of 07.20.04, the overlapped structure is only used by * apr_socket_sendfile and that's where it will be allocated * and initialized. */ OVERLAPPED *overlapped; +#endif sock_userdata_t *userdata; }; diff --git a/network_io/win32/sockets.c b/network_io/win32/sockets.c index 82d16860b..464db5ac8 100644 --- a/network_io/win32/sockets.c +++ b/network_io/win32/sockets.c @@ -35,10 +35,12 @@ static apr_status_t socket_cleanup(void *sock) } thesocket->socketdes = INVALID_SOCKET; } +#if APR_HAS_SENDFILE if (thesocket->overlapped) { CloseHandle(thesocket->overlapped->hEvent); thesocket->overlapped = NULL; } +#endif return APR_SUCCESS; } |