]> granicus.if.org Git - php/commitdiff
MFB: Fixed bug #37376 (fastcgi.c compile fail with gcc 2.95.4).
authorIlia Alshanetsky <iliaa@php.net>
Tue, 9 May 2006 22:00:36 +0000 (22:00 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 9 May 2006 22:00:36 +0000 (22:00 +0000)
sapi/cgi/fastcgi.c

index 0fc16d5671398857c334bb704d9aee40c8889e28..94a2cf67ca9da7931a8712ff75125c31c37457f9 100644 (file)
@@ -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)) {