Skip to content

Commit

Permalink
Fixed bug #37376 (fastcgi.c compile fail with gcc 2.95.4).
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Alshanetsky committed May 9, 2006
1 parent 5a8b4e7 commit 5718445
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -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 <signal.h>).
(jdolecek)
Expand Down
12 changes: 7 additions & 5 deletions sapi/cgi/fastcgi.c
Expand Up @@ -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)) {
Expand Down

0 comments on commit 5718445

Please sign in to comment.