php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37376 fastcgi.c compile fail with gcc 2.95.4
Submitted: 2006-05-09 10:02 UTC Modified: 2006-05-10 10:17 UTC
From: dan+php dot net at obluda dot cz Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.1.4 OS: FreeBSD 4.11
Private report: No CVE-ID: None
 [2006-05-09 10:02 UTC] dan+php dot net at obluda dot cz
Description:
------------
Compile of sapi/cgi/fastcgi.c fail with syntax error on line 692 in the case the compiler allow variable declaration on start of block only (it's the gcc 2.95.4 case).

The relevant code part is:
 --------------
 #else
	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);
 #endif
 ---------------

The fix: cover the block starting sa_t sa declaration and ending FCGI_UNLOCK function call into {}


Reproduce code:
---------------
N/A

Expected result:
----------------
N/A

Actual result:
--------------
N/A

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-10 10:17 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Ilia fixed it in CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC