php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch fpm-bugs-60629.patch for FPM related Bug #60629

Patch version 2012-01-03 18:02 UTC

Return to Bug #60629 | Download this patch
Patch Revisions:

Developer: fat@php.net

Index: sapi/fpm/fpm/fastcgi.c
===================================================================
--- sapi/fpm/fpm/fastcgi.c	(revision 321730)
+++ sapi/fpm/fpm/fastcgi.c	(working copy)
@@ -946,7 +946,7 @@
 	return 1;
 }
 
-int fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, int len)
+ssize_t fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, int len)
 {
 	int limit, rest;
 
Index: sapi/fpm/fpm/fastcgi.h
===================================================================
--- sapi/fpm/fpm/fastcgi.h	(revision 321730)
+++ sapi/fpm/fpm/fastcgi.h	(working copy)
@@ -127,7 +127,7 @@
 
 int fcgi_read(fcgi_request *req, char *str, int len);
 
-int fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, int len);
+ssize_t fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, int len);
 int fcgi_flush(fcgi_request *req, int close);
 
 void fcgi_set_mgmt_var(const char * name, size_t name_len, const char * value, size_t value_len);
Index: sapi/fpm/fpm/fpm_main.c
===================================================================
--- sapi/fpm/fpm/fpm_main.c	(revision 321730)
+++ sapi/fpm/fpm/fpm_main.c	(working copy)
@@ -268,7 +268,7 @@
 
 static inline size_t sapi_cgibin_single_write(const char *str, uint str_length TSRMLS_DC)
 {
-	size_t ret;
+	ssize_t ret;
 
 	/* sapi has started which means everyhting must be send through fcgi */
 	if (fpm_is_running) {
@@ -277,7 +277,7 @@
 		if (ret <= 0) {
 			return 0;
 		}
-		return ret;
+		return (size_t)ret;
 	}
 
 	/* sapi has not started, output to stdout instead of fcgi */
@@ -286,7 +286,7 @@
 	if (ret <= 0) {
 		return 0;
 	}
-	return ret;
+	return (size_t)ret;
 #else
 	return fwrite(str, 1, MIN(str_length, 16384), stdout);
 #endif
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 05:01:30 2024 UTC