diff options
| author | Wez Furlong <wez@php.net> | 2004-03-30 11:04:32 +0000 |
|---|---|---|
| committer | Wez Furlong <wez@php.net> | 2004-03-30 11:04:32 +0000 |
| commit | 0825bb2386d34c9693be18106b48256788042226 (patch) | |
| tree | 7518496fed30f30d4ecbb86ba04e65caf60e5925 | |
| parent | 64fe4952b62c5c6fd72bb38f6cd1c42c0bfb816a (diff) | |
| download | php-git-0825bb2386d34c9693be18106b48256788042226.tar.gz | |
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.
| -rwxr-xr-x | main/streams.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |
