]> granicus.if.org Git - php/commitdiff
Fix for Bug #27762: SCO Openserver doesn't have S_ISSOCK
authorWez Furlong <wez@php.net>
Tue, 30 Mar 2004 11:04:32 +0000 (11:04 +0000)
committerWez Furlong <wez@php.net>
Tue, 30 Mar 2004 11:04:32 +0000 (11:04 +0000)
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.

main/streams.c

index 087deb252310dd94459907cd6da33c12885e4004..52e14ac5b25971b9cc2c4850c0d34441052a29a9 100755 (executable)
@@ -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);
        }