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: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jdolecek at netbsd dot org
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC