summaryrefslogtreecommitdiff
path: root/ext/phar/tar.c
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2009-07-26 01:03:47 +0000
committerGreg Beaver <cellog@php.net>2009-07-26 01:03:47 +0000
commit732f4af0823da1114d7ab32b53ef804904a8d7b8 (patch)
tree96b3efb4c09c30a5f8fea5b46cbf5fd6c50646c7 /ext/phar/tar.c
parent571dfc1e49fc283a0a383f4ec0f9e452c6f6cebb (diff)
downloadphp-git-732f4af0823da1114d7ab32b53ef804904a8d7b8.tar.gz
re-organize slightly, fix more php6-only compile warnings in php_stream_copy_to_mem
Diffstat (limited to 'ext/phar/tar.c')
-rw-r--r--ext/phar/tar.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/phar/tar.c b/ext/phar/tar.c
index afc22d7808..383356fb93 100644
--- a/ext/phar/tar.c
+++ b/ext/phar/tar.c
@@ -928,7 +928,11 @@ int phar_tar_flush(phar_archive_data *phar, char *user_stub, long len, int defau
len = -len;
}
user_stub = 0;
+#if PHP_MAJOR_VERSION >= 6
+ if (!(len = php_stream_copy_to_mem(stubfile, (void **) &user_stub, len, 0)) || !user_stub) {
+#else
if (!(len = php_stream_copy_to_mem(stubfile, &user_stub, len, 0)) || !user_stub) {
+#endif
if (error) {
spprintf(error, 0, "unable to read resource to copy stub to new tar-based phar \"%s\"", phar->fname);
}