Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 251665 - New open(2) magic breaks php build
New open(2) magic breaks php build
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-08-10 06:43 EDT by Hans de Goede
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-08-10 08:16:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Hans de Goede 2007-08-10 06:43:30 EDT
Description of problem:
I just update glibc and now when compiling php5 I get:
/home/hans/projects/fedora-extras/php/devel/php-5.2.3/ext/dba/dba.c: In function
/home/hans/projects/fedora-extras/php/devel/php-5.2.3/ext/dba/dba.c:933: error:
expected identifier before '(' token

Before the glibc update it compiled fine, line 933 is:
        if (error || hptr->open(info, &error TSRMLS_CC) != SUCCESS) {

Adding "#undef open" after the #include statements fixes this. Am I the only one
who things making open a macro is a bad idea? There are bound to be many pieces
of software with structs, with in the struct a function pointer called open.
Comment 1 Jakub Jelinek 2007-08-10 08:16:58 EDT
You can and should use (hptr->open)(info, &error TSRMLS_CC)
or hptr->(open)(info, &error TSRMLS_CC)
POSIX allows any standard function to be defined function-like macro and
in the case of open the reason why we changed it were multiple requests from
security folks - way too many packages aren't able to use open correctly
with O_CREAT and pass random flags as third argument, which often is a security
Comment 2 Joe Orton 2007-08-10 08:30:28 EDT
Hans, I've added the patch to fix this to the devel branch.

Note You need to log in before you can comment on or make changes to this bug.