apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1543034 - in /apr/apr/branches/1.5.x: ./ network_io/unix/socket_util.c
Date Mon, 18 Nov 2013 14:11:26 GMT
Author: jim
Date: Mon Nov 18 14:11:26 2013
New Revision: 1543034

URL: http://svn.apache.org/r1543034
Log:
Merge r1543033 from trunk:

OSX (Darwin) returns APR_POLLHUP|APR_POLLIN, so the
test for equality fails. Instead, just check for the bit.

Reviewed/backported by: jim

Modified:
    apr/apr/branches/1.5.x/   (props changed)
    apr/apr/branches/1.5.x/network_io/unix/socket_util.c

Propchange: apr/apr/branches/1.5.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1543033

Modified: apr/apr/branches/1.5.x/network_io/unix/socket_util.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/network_io/unix/socket_util.c?rev=1543034&r1=1543033&r2=1543034&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/network_io/unix/socket_util.c (original)
+++ apr/apr/branches/1.5.x/network_io/unix/socket_util.c Mon Nov 18 14:11:26 2013
@@ -46,7 +46,12 @@ APR_DECLARE(apr_status_t) apr_socket_atr
         /* Some other error -> unexpected error. */
         return rv;
     }
+#if defined(DARWIN)
+    /* OSX returns APR_POLLHUP|APR_POLLIN */
+    else if (nfds == 1 && (pfds[0].rtnevents & APR_POLLIN)  == APR_POLLIN) {
+#else
     else if (nfds == 1 && pfds[0].rtnevents == APR_POLLIN) {
+#endif
         apr_sockaddr_t unused;
         apr_size_t len = 1;
         char buf;



Mime
View raw message