Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 260111 - =games-util/etswitch-0.1.14 uses open(2) incorrectly
Summary: =games-util/etswitch-0.1.14 uses open(2) incorrectly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High trivial
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-24 11:02 UTC by Michał Górny
Modified: 2009-02-24 19:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix use of open(2) (etswitch-0.1.14-libc-open.diff,628 bytes, patch)
2009-02-24 11:03 UTC, Michał Górny
Details | Diff
Updated ebuild (etswitch-0.1.14-r1.ebuild,857 bytes, text/plain)
2009-02-24 11:04 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-02-24 11:02:36 UTC
=games-util/etswitch-0.1.14 uses two-argument syntax of open(2) with O_CREAT, where it needs 3 arguments. Thus, the build fails with current glibc:

In function ‘open’,
    inlined from ‘main’ at etswitch.c:464:
/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

The solution is to use 3-argument syntax of open(2) there.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-02-24 11:03:19 UTC
Created attachment 183002 [details, diff]
Patch to fix use of open(2)
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-02-24 11:04:02 UTC
Created attachment 183004 [details]
Updated ebuild
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2009-02-24 19:08:31 UTC
in portage.  thanks for the bug report and patch.