apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1543033 - /apr/apr/trunk/network_io/unix/socket_util.c
Date Mon, 18 Nov 2013 14:10:59 GMT
Author: jim
Date: Mon Nov 18 14:10:58 2013
New Revision: 1543033

URL: http://svn.apache.org/r1543033
Log:
OSX (Darwin) returns APR_POLLHUP|APR_POLLIN, so the
test for equality fails. Instead, just check for the bit.

Modified:
    apr/apr/trunk/network_io/unix/socket_util.c

Modified: apr/apr/trunk/network_io/unix/socket_util.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/network_io/unix/socket_util.c?rev=1543033&r1=1543032&r2=1543033&view=diff
==============================================================================
--- apr/apr/trunk/network_io/unix/socket_util.c (original)
+++ apr/apr/trunk/network_io/unix/socket_util.c Mon Nov 18 14:10:58 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