From: Wez Furlong Date: Tue, 30 Mar 2004 11:04:32 +0000 (+0000) Subject: Fix for Bug #27762: SCO Openserver doesn't have S_ISSOCK X-Git-Tag: php-4.3.6RC1~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0825bb2386d34c9693be18106b48256788042226;p=php Fix for Bug #27762: SCO Openserver doesn't have S_ISSOCK Possible side effect from this is that CLI scripts run from inetd won't realize that stdin/stdout are sockets. But thats not our problem. --- diff --git a/main/streams.c b/main/streams.c index 087deb2523..52e14ac5b2 100755 --- a/main/streams.c +++ b/main/streams.c @@ -2021,7 +2021,9 @@ PHPAPI php_stream *_php_stream_fopen_from_fd(int fd, const char *mode, const cha int stat_ok; stat_ok = fd >= 0 && fstat(fd, &sb) == 0; +#endif +#if defined(S_ISSOCK) if (stat_ok && S_ISSOCK(sb.st_mode)) { return _php_stream_sock_open_from_socket(fd, persistent_id STREAMS_CC TSRMLS_CC); }