diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2004-02-27 14:40:27 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2004-02-27 14:40:27 +0000 |
commit | 94c1254f966dd1d06df1c798d68f599e356fd997 (patch) | |
tree | a9b255b3fee0418b9f73dc1255ec6539254fd272 /network_io | |
parent | d46c9c487c7510b2f9be9b7cba2d1d5215d3bba8 (diff) | |
download | libapr-94c1254f966dd1d06df1c798d68f599e356fd997.tar.gz |
fix some compile and/or run-time bogosity on Unix-ish platforms
with no O_NDELAY or FNDELAY flags
this has been here since apr time zero when it was mis-copied
from Apache httpd 1.3's buff.c, so perhaps this doesn't actually
make anyone's life easer
Discovered by: Joe Orton
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@64924 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io')
-rw-r--r-- | network_io/unix/sockopt.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/network_io/unix/sockopt.c b/network_io/unix/sockopt.c index 32c1d2a1b..687f65a09 100644 --- a/network_io/unix/sockopt.c +++ b/network_io/unix/sockopt.c @@ -29,10 +29,9 @@ static apr_status_t soblock(int sd) #elif defined(O_NDELAY) fd_flags &= ~O_NDELAY; #elif defined(FNDELAY) - fd_flags &= ~O_FNDELAY; + fd_flags |= FNDELAY; #else - /* XXXX: this breaks things, but an alternative isn't obvious...*/ - return -1; +#error Please teach APR how to make sockets blocking on your platform. #endif if (fcntl(sd, F_SETFL, fd_flags) == -1) { return errno; @@ -56,10 +55,9 @@ static apr_status_t sononblock(int sd) #elif defined(O_NDELAY) fd_flags |= O_NDELAY; #elif defined(FNDELAY) - fd_flags |= O_FNDELAY; + fd_flags |= FNDELAY; #else - /* XXXX: this breaks things, but an alternative isn't obvious...*/ - return -1; +#error Please teach APR how to make sockets non-blocking on your platform. #endif if (fcntl(sd, F_SETFL, fd_flags) == -1) { return errno; |