summaryrefslogtreecommitdiff
path: root/ext/bz2/bz2.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bz2/bz2.c')
-rw-r--r--ext/bz2/bz2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c
index 668f88c78d..1d1c0fb9b3 100644
--- a/ext/bz2/bz2.c
+++ b/ext/bz2/bz2.c
@@ -31,6 +31,7 @@
#include "ext/standard/file.h"
#include "ext/standard/info.h"
#include "ext/standard/php_string.h"
+#include "main/php_network.h"
/* for fileno() */
#include <stdio.h>
@@ -245,7 +246,7 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
stream = php_stream_open_wrapper(path, mode, options | STREAM_WILL_CAST, opened_path);
if (stream) {
- int fd;
+ php_socket_t fd;
if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void **) &fd, REPORT_ERRORS)) {
bz_file = BZ2_bzdopen(fd, mode);
}
@@ -394,7 +395,7 @@ static PHP_FUNCTION(bzopen)
NULL);
} else if (Z_TYPE_PP(file) == IS_RESOURCE) {
/* If it is a resource, than its a stream resource */
- int fd;
+ php_socket_t fd;
int stream_mode_len;
php_stream_from_zval(stream, file);