php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42627 bz2 extension fails to build with -fno-common
Submitted: 2007-09-11 19:34 UTC Modified: 2007-09-12 11:45 UTC
From: jdolecek at netbsd dot org Assigned:
Status: Closed Package: Bzip2 Related
PHP Version: 5.2.4 OS: Mac OS X
Private report: No CVE-ID:
 [2007-09-11 19:34 UTC] jdolecek at netbsd dot org
Description:
------------
bz2 extension header causes php_bz2_filter_factory symbol to be a common symbol, rather then extern variable, due to lacking 'extern' modifier. When compiling on Mac OS X, which uses -fno-common by default, this causes build failure. The header should define it just as extern, since the symbol is properly declared in bz2_filter.c.

Fix:

--- ext/bz2/php_bz2.h.orig      2007-09-02 20:11:08.000000000 +0200
+++ ext/bz2/php_bz2.h
@@ -51,7 +51,7 @@ PHP_BZ2_API php_stream *_php_stream_bz2o
 #define php_stream_bz2open_from_BZFILE(bz, mode, innerstream)  _php_stream_bz2open_from_BZFILE((bz), (mode), (innerstream) STREAMS_CC TSRMLS_CC)
 #define php_stream_bz2open(wrapper, path, mode, options, opened_path)  _php_stream_bz2open((wrapper), (path), (mode), (options), (opened_path), NULL STREAMS_CC TSRMLS_CC)

-php_stream_filter_factory php_bz2_filter_factory;
+extern php_stream_filter_factory php_bz2_filter_factory;
 extern php_stream_ops php_stream_bz2io_ops;
 #define PHP_STREAM_IS_BZIP2    &php_stream_bz2io_ops




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-12 11:45 UTC] jani@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.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 22:02:16 2014 UTC