From 57184454e9e3ccecb2b55dc71cd7dc1aa65a3ad3 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 9 May 2006 22:00:08 +0000 Subject: [PATCH] Fixed bug #37376 (fastcgi.c compile fail with gcc 2.95.4). --- NEWS | 1 + sapi/cgi/fastcgi.c | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 6d9475d2e87..d43e1184215 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ PHP NEWS - Added support for Apache 2.2 handler in the Windows distro. (Edin) - Added pg_field_table() function. (Edin) - Add implementation of curl_multi_info_read (Brian) +- Fixed bug #37376 (fastcgi.c compile fail with gcc 2.95.4). (Ilia) - Fixed bug #37348 (make PEAR install ignore open_basedir). (Ilia) - Fixed bug #37313 (sigemptyset() used without including ). (jdolecek) diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c index 0fc16d56713..94a2cf67ca9 100644 --- a/sapi/cgi/fastcgi.c +++ b/sapi/cgi/fastcgi.c @@ -669,12 +669,14 @@ int fcgi_accept_request(fcgi_request *req) } FCGI_UNLOCK(req->listen_socket); #else - sa_t sa; - socklen_t len = sizeof(sa); + { + sa_t sa; + socklen_t len = sizeof(sa); - FCGI_LOCK(req->listen_socket); - req->fd = accept(req->listen_socket, (struct sockaddr *)&sa, &len); - FCGI_UNLOCK(req->listen_socket); + FCGI_LOCK(req->listen_socket); + req->fd = accept(req->listen_socket, (struct sockaddr *)&sa, &len); + FCGI_UNLOCK(req->listen_socket); + } #endif if (req->fd < 0 && (in_shutdown || errno != EINTR)) {