summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmain/streams.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/streams.c b/main/streams.c
index ee1328b0f1..c680cf3c31 100755
--- a/main/streams.c
+++ b/main/streams.c
@@ -1639,6 +1639,10 @@ PHPAPI php_stream *_php_stream_fopen_with_path(char *filename, char *mode, char
}
/* }}} */
+#ifndef S_ISREG
+#define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG)
+#endif
+
/* {{{ php_stream_fopen */
PHPAPI php_stream *_php_stream_fopen(const char *filename, const char *mode, char **opened_path, int options STREAMS_DC TSRMLS_DC)
{