open() is buggy in recent glibc (was: Koji cannot build openldap)

Enrico Scholz enrico.scholz at informatik.tu-chemnitz.de
Sat Aug 4 11:36:54 UTC 2007


Jakub Jelinek <jakub at redhat.com> writes:

> It includes <fcntl.h>, which provides open, and POSIX allows
> functions to be defined as function-like macros.  Until recently
> glibc didn't define open as a function like macro, but in glibc
> 2.6.90 and later it does when -D_FORTIFY_SOURCE=2, to enforce
> correct use of open/open64/openat/openat64.

New code seems to be buggy and fails at legitimate use of open()

|  fd = open(file, O_RDONLY);

with

| src/vlimit.c: In function 'readFile':
| src/vlimit.c:280: warning: ISO C forbids empty initializer braces
| src/vlimit.c:280: error: zero or negative size array '___arr'
| src/vlimit.c:280: warning: ISO C forbids zero-size array '__open_too_many_args'
| src/vlimit.c:280: warning: ISO C forbids braced-groups within expressions

http://koji.fedoraproject.org/koji/getfile?taskID=88648&name=build.log


Beside the error, it clutters the build with bogus 'ISO C forbids ...' 
warnings.



Enrico
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 480 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-maintainers/attachments/20070804/7856cc1b/attachment.sig>


More information about the Fedora-maintainers mailing list