diff options
| -rwxr-xr-x | main/streams/streams.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index 728a602bd9..68ed110451 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1168,7 +1168,11 @@ PHPAPI size_t _php_stream_copy_to_stream(php_stream *src, php_stream *dest, size if (php_stream_stat(src, &ssbuf) == 0) { /* in the event that the source file is 0 bytes, return 1 to indicate success * because opening the file to write had already created a copy */ - if (ssbuf.sb.st_size == 0 && !S_ISFIFO(ssbuf.sb.st_mode)) { + if (ssbuf.sb.st_size == 0 +#ifdef S_ISFIFO + && !S_ISFIFO(ssbuf.sb.st_mode) +#endif + ) { return 1; } } |
