#37376 [NEW]: fastcgi.c compile fail with gcc 2.95.4
| From: | dan+php dot net at obluda dot cz | Date: | Tue, 09 May 2006 10:02:26 +0000 |
| Subject: | #37376 [NEW]: fastcgi.c compile fail with gcc 2.95.4 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-96842@lists.php.net to get a copy of this message | ||
From: dan+php dot net at obluda dot cz
Operating system: FreeBSD 4.11
PHP version: 5.1.4
PHP Bug Type: Compile Failure
Bug description: fastcgi.c compile fail with gcc 2.95.4
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
--
Edit bug report at http://bugs.php.net/?id=37376&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37376&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37376&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37376&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37376&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37376&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37376&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37376&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37376&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37376&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37376&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37376&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37376&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37376&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37376&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37376&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37376&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37376&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37376&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37376&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37376&r=mysqlcfg