Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 260081

Summary: app-text/clara-20031214 __open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
Product: Gentoo Linux Reporter: Magnus Granberg <zorry>
Component: [OLD] UnspecifiedAssignee: Michal Januszewski (RETIRED) <spock>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: 2008.0   
Hardware: All   
OS: Linux   
URL: http://hardened.gentooexperimental.org/trac/secure/ticket/29
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 259417    
Attachments: Build log of clara-20031214
fix for O_CREAT bug in pgmblock.c
cl_msg.c patch

Description Magnus Granberg gentoo-dev 2009-02-23 23:32:54 UTC
Compile with GCC 4.3.3 (FORTIFY_SOURCE=2)
man open:
mode specifies the permissions to use in case a new file is created.  This
argument must be supplied when O_CREAT is specified in flags;


Reproducible: Always

Steps to Reproduce:
1.Compile tha package with gcc 4.3.3 and glibc >=2.8 from portage
2.
3.

Actual Results:  
In function 'open',
    inlined from 'pgmunmap' at pgmblock.c:200:
/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
In function 'open',
    inlined from 'pgmmap' at pgmblock.c:164:
/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make: *** [pgmblock.o] Error 1

Expected Results:  
Would compile fine
Comment 1 Magnus Granberg gentoo-dev 2009-02-23 23:33:48 UTC
Created attachment 182973 [details]
Build log of clara-20031214
Comment 2 Magnus Granberg gentoo-dev 2009-03-05 02:11:30 UTC
Created attachment 183960 [details]
fix for O_CREAT bug in pgmblock.c
Comment 3 Michal Januszewski (RETIRED) gentoo-dev 2009-03-22 07:56:28 UTC
Fixed in CVS, thanks for the patch.
Comment 4 calculator 2009-11-16 15:19:30 UTC
Created attachment 210413 [details, diff]
cl_msg.c patch

some bug with:

    inlined from 'cl_msg_stats_open' at cl_msg.c:149,
    inlined from 'cl_msg_stats_add' at cl_msg.c:173:
/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
gmake[2]: *** [cl_msg.lo] Error 1
gmake[2]: Leaving directory `/var/tmp/portage/sys-cluster/heartbeat-2.0.8/work/heartbeat-2.0.8/lib/clplumbing'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/var/tmp/portage/sys-cluster/heartbeat-2.0.8/work/heartbeat-2.0.8/lib'
make: *** [all-recursive] Error 1
Comment 5 Michal Januszewski (RETIRED) gentoo-dev 2009-11-22 15:44:21 UTC
(In reply to comment #4)
> `/var/tmp/portage/sys-cluster/heartbeat-2.0.8/work/heartbeat-

Please file a separate bug for sys-cluster/heartbeat instead.